• Corey_B
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

I have a custom exception class like so:

 

 

global class MyException extends Exception {
    
    global Boolean isCritical { get; private set; }
    
    global MyException( String msg, Boolean isCritical)
    {
        this(msg);
        this.isCritical = isCritical;
    }
}

 

 

But when MyException is thrown and caught the message that I get says "script-throw exception" as opposed to the message that I had specified.

 

Any ideas on how to get the message out of the exception? Thanks.