make error message more useful

This is a suggestion designed to make it easier for newbies to use Maple.

Example:

 > solve(f=0,x,x=-1..1);
 Error, (in solve) invalid arguments

could be instead:

Error, (in solve) invalid arguments. 
It looks like you have provided a range for solve, which doesn't require one. Related commands include: fsolve, dsolve. Check the Help menu for solve/details.

This could be done by default for the most popular calls, such as solve, plot, etc. with an option to disable the verbose error message for advanced users. Or else to disable it by default but to produce a message advertising the option "verbose" after each call to restart; so that newbies may easily access it.

verbosity

The level of verbosity and usefulness of the error messages is quite multiform throughout the system. E.g. this is more useful in telling what is wrong:

dsolve(diff(f(x),x)=0,x,x=-1..1);

Error, (in ODEtools/info) found wrong extra arguments: {x, x = -1 .. 1}

 

verbosity and clarity

and sometimes the message is obscure -- what is a "typed procedure"?

f := x-> x^2:
fsolve(f=0,x,x=-1..1);
Error, (in fsolve) Can't handle expressions with typed procedures

The plot thickens

When I posted my initial message, here's what I got, I think:


solve(f=0,x,x=-1..1);
Error, (in solve) invalid arguments

But when I ran the code again today, here's what I got instead:

solve(f=0,x,x=-1..1);
Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is x = -1 .. 1

Has Maple been updated overnight? Had I drunk too much maple syrup?

I most likely ran the first call in the middle of another session, but other than that I can't think of why this discrepancy came up. The second error message is a lot more useful, similar to the one jakubi posted above with dsolve.
 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}