Results 1 to 4 of 4

Thread: Raising exceptions in Simba

  1. #1
    Join Date
    Oct 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Raising exceptions in Simba

    I can't seem to find any documentation on raising exceptions in Simba. I tried compiling the following SCAR script:

    SCAR Code:
    begin
      raise Exception.Create('Test');
    end.

    I expected that it might fail because the Exception class doesn't exist or isn't within scope. Instead, it gave me the error "Unknown identifier 'raise' at line 2". Am I right in assuming that the compiler isn't recognizing the 'raise' keyword? If this is the case, is it possible to raise exceptions at all in Simba?

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    RaiseException(erCustomError, 'hello');

    possible exceptions:
    ErNoError, erCannotImport, erInvalidType, ErInternalError, erInvalidHeader, erInvalidOpcode, erInvalidOpcodeParameter, erNoMainProc, erOutOfGlobalVarsRange, erOutOfProcRange, ErOutOfRange, erOutOfStackRange, ErTypeMismatch, erUnexpectedEof, erVersionError, ErDivideByZero, ErMathError,erCouldNotCallProc, erOutofRecordRange, erOutOfMemory, erException, erNullPointerException, erNullVariantError, erInterfaceNotSupported, erCustomError
    Working on: Tithe Farmer

  3. #3
    Join Date
    Oct 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Excellent, thanks!

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    No problem. Never seen anyone use them, mind sharing what you want to do with them?
    Working on: Tithe Farmer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •