Bug Throw exceptions

Discussion in 'Developer Support' started by Era, Oct 14, 2015.

  1. Era

    Era

    Joined:
    Oct 14, 2015
    Messages:
    11
    Likes Received:
    2
    Hi.

    I want to throw an exception so I get notified in the developer panel if something goes wrong with my script bot.
    However, it seems that it's not possible to throw an Exception in Task#execute.

    [​IMG]

    I just want to throw it and make it stop the script bot, so the dialog pops-up with the information that an exception happened. (The built-in dialog)
    What should I do in order to achieve this?
     
  2. Defeat3d

    Defeat3d Celestial

    Joined:
    Oct 30, 2014
    Messages:
    1,142
    Likes Received:
    486
    Answer below. :p
     
  3. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,431
    Likes Received:
    1,008
    Replace Exception with RuntimeException and you're good to go.
     
    Defeat3d likes this.
  4. Era

    Era

    Joined:
    Oct 14, 2015
    Messages:
    11
    Likes Received:
    2
    Thanks, it works! :)
     
  5. Defeat3d

    Defeat3d Celestial

    Joined:
    Oct 30, 2014
    Messages:
    1,142
    Likes Received:
    486
    OK, TIL.
     

Share This Page

Loading...