[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49155] No error identifier when loading a non
[Octave-bug-tracker] [bug #49155] No error identifier when loading a nonexistant package
Thu, 22 Sep 2016 22:17:28 +0000 (UTC)
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Follow-up Comment #4, bug #49155 (project octave):
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:
pkg load foobar;
error ("failed to load package foobar: %s", lasterr ());
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.
Reply to this item at:
Message sent via/by Savannah