(%i1) integrate(x,x,0,inf);
defint: integral is divergent.
-- an error. To debug this try debugmode(true);
This is my first suggestion:
(%i1) integrate(x,x,0,inf);
defint: Maxima encountered a divergent integral in the calculation.
[]
"I have thought that this looks a bit more user friendly. No Maxima error
and no result. Of cause, the message can be more verbose. We can include
the integral in the message, give information about the method which
detects the divergent integral, .... Therefore the next idea: Do not
print all information available, but store it and allow the user to
inspect the last messages in more detail."
Personally I think most users are not writing programs in Maxima. In my case that is not true and the current situation is that I
put an errcatch() around possible statements that will halt the program. My preference is to return an empty list for divergent
integrals and print the message. I think there should be additional debugging information available but not printed automatically.
Maybe a list of information messages tracing the error which is available by calling some other function right after the error
occurs.
I have no opinion about a general response to all possible unexpected things that can happen.
Rich