cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

how to find out who causes an error

ifomenko
15-Moonstone

how to find out who causes an error

Hi,I use the error message function to inform me about some errors in a few functions. At the same time I use on error operator to get already calculated results in a loop. Without it I can't see what is happening (I can't get already calculated results).

I want to find out which function causes an error without using debug mode. Is it possible?

Simplified example without loop is attached.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ifomenko)

I guess you'll have to ask in func3 multiple times

Werner_E_0-1595936718150.png

 

Another option might be that func1 and func2 don't throw an error but return some kind of error code as reault which then can be checked by func3.

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:ifomenko)

I guess you'll have to ask in func3 multiple times

Werner_E_0-1595936718150.png

 

Another option might be that func1 and func2 don't throw an error but return some kind of error code as reault which then can be checked by func3.

ifomenko
15-Moonstone
(To:Werner_E)

Thank you very much for idea to return error code (string) instead of firing an error. It works well enough.

tietjee
15-Moonstone
(To:ifomenko)

Mathcad 15 has a trace command.  This will provide output during the running of a program.  It is helpful in debugging programs.  Prime 6 does not have the command.

 

Cheers,

 

David

ifomenko
15-Moonstone
(To:tietjee)

Thanks David, but debug mode doesn't give you ability to see long vector or matrix, it does't give you ability to plot already calculated results. If MC meets error it doesn't return anything. That's why I wrote "not using debug mode".

Announcements

Top Tags