Error in Python script crashes Moneydance - how to debug

lodewijk's Avatar

lodewijk

04 Feb, 2019 08:28 PM

After upgrading to 2019.1, I tried to run one of my Python scripts developed for 2017.10. Unfortunately there appears to be an error in the python script (as reported by the console) which very quickly disappears as Moneydance crashes....

In 2017.10 the 'on-error' behavior was to raise an exception in the execution window, allowing for straightforward debugging. How do I prevent Moneydance crashing when one of my Python scripts misbehaves?

  1. 1 Posted by lodewijk on 04 Feb, 2019 08:56 PM

    lodewijk's Avatar

    Found the error!

    Formerly exit() would terminate Jython only, now it apparently forwards the call and exits the JVM.

    The solution was provided in : https://forum.image.sc/t/sys-exit-in-jython/2337/3

    To raise an exception instead of exit().

  2. Support Staff 2 Posted by Sean Reilly on 04 Feb, 2019 09:05 PM

    Sean Reilly's Avatar

    Ah, thanks for forwarding on the solution! I will take a look to see if there's some way we can catch the calls to exit() since we really don't want any scripts to be able to shutdown the JVM altogether.

    Thanks,
    Sean

  3. System closed this discussion on 06 May, 2019 09:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac