bugGNU Octave - Bugs: bug #49155, No error identifier when loading a...


bug #49155: No error identifier when loading a nonexistant package

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 22 Sep 2016 11:01:23 AM UTC  
Category: Octave FunctionSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.0.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 22 Sep 2016 10:17:27 PM UTC, comment #4:

Is a specific error id for missing package really that useful? If you have a program that needs a specific package, then it doesn't matter for the writer of the program if the package fails to load because is not installed or if there is some other reason that makes it fail to load. And when it matters, it's easy to check first if the package is installed.

I'd imagine the following snippet to be more useful in a real case:

Which in my cases throws back "error: failed to load package foobar: package foobar is not installed" (in practice, I never check this, the uncatched error message should be enough).

Also, note that just because a package is loaded, doesn't mean a specific function will be available. Some packages will disable some functions.

Carnë Draug <carandraug>
Project Member
Thu 22 Sep 2016 06:22:46 PM UTC, comment #3:

Absolutely, sounds like a good dea.

Rik <rik5>
Project Administrator
Thu 22 Sep 2016 06:15:44 PM UTC, comment #2:

There are very few errors in the entire scripts directory that do have error identifiers, this error is just one of thousands.

It's a development goal for all errors in Octave to have identifiers, right? Maybe we should recategorize this as a project or task with wider scope than just this one error message.

Mike Miller <mtmiller>
Project Administrator
Thu 22 Sep 2016 03:23:02 PM UTC, comment #1:

Confirmed. Sample code to demonstrate the issue:

This was tested with the 4.2.0-rc2 version of Octave.

Rik <rik5>
Project Administrator
Thu 22 Sep 2016 11:01:23 AM UTC, original submission:

If I do

> load pkg nonexistent

the thrown erro is anonymous as reported by

> lasterror

This error should have an identifier

Francesco Potortì <pot>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by pot (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Sep 2016 03:24:57 PM UTCrik5SummaryNo erorr identifier when load a nonexisting package=>No error identifier when loading a nonexistant package
    Thu 22 Sep 2016 03:23:02 PM UTCrik5Severity3 - Normal=>2 - Minor

    Back to the top

    Powered by Savane 3.1-cleanup1