1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 Primate

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

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,938
    Likes Received:
    1,266
    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 Primate

    Joined:
    Oct 30, 2014
    Messages:
    3,073
    Likes Received:
    1,894
    OK, TIL.
     

Share This Page

Loading...