Menu

#4 Interp.resultCode, ...

open
nobody
None
5
2003-08-29
2003-08-29
No

Hi there,

It would be good to create accessor methods for
Interp.resultCode, Interp.errorCode, Interp.errorString.

This would allow enclosing applications to catch
TclException with a completion code of TCL.RETURN and
then see whether the return was due to error. This
would allow the application to display/propogate the
error condition that was generated by the return.

Regards,
Jason

Discussion

  • Mo DeJong

    Mo DeJong - 2004-11-18

    Logged In: YES
    user_id=90858

    Jason

    I was under the impression that the eval() method in the interp
    class already takes care of that for you. It does allow and
    exception
    with a completion code of TCL.RETURN to be raised from the
    eval() method. Instead, it catches such an exception and returns
    from the eval() method normally.

     
  • Jason Lohrey

    Jason Lohrey - 2004-11-19

    Logged In: YES
    user_id=706521

    This was quite a while ago, so I was trying to ascertain what
    I was saying (which means it was not the best enhancement
    request).

    I note that we are accessing the
    members "errorInfo", "errorCode" and "returnCode" in the
    class Interp to get the information we need, so I don't think
    there is a problem.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.