Instead of "errcatch"

Instead of "errcatch"

by yann riu -
Number of replies: 1

I am creating a Stack question in which I would like to check if a sum given by a student is convergent.

I thought this problem was undecidable, but in Maxima if I enter:

sum(1/k,k,1,inf);

I get  the following error message :

sum: sum is divergent.

-- an error. To debug this try: debugmode(true);

Hence Maxima has detected this divergence, and I can catch this error in Maxima with "errcatch". This works under "normal" Maxima.
However this "errcatch" routine is forbidden in Stack. Is there an other way to catch an error in Stack ?

Stack version : 4.2
Maxima version: 5.34.1-2


Average of ratings: -
In reply to yann riu

Re: Instead of "errcatch"

by yann riu -
A more general problem is when we need to catch an execution error.
For instance, if the student provides the expression log ( n ).
If we want to this this expression for n=0, then the execution error will be raised : "log: encountered log (0)." and I don't know how to catch this error.