-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implemented feature #181 "Allow catching aborts".
Syntax changes for UCC: Added "throw" command, an alias to "abort" which should be used whenever it makes sense. Both forms accept an optional parameter which is passed to the handler; if no parameter is specified, Exult will send the text "abort executed" for compatibility with the original games. Examples: abort; // same as abort "abort executed"; throw; // same as abort; throw 1+1; abort "Error message"; throw varname; // varname must be a variable or function throw UI_get_random(18); abort [1, 2, 3]; To handle (catch) an abort/throw, use the following syntax: try { // code that can generate an abort/throw } catch (optvarname) { // code that handles the abort/throw } // Code that gets executed afterwards optvarname is an optional variable name. If present, a variable will be created with this name which will receive the abort/throw's parameter; otherwise, that parameter will be discarded. Note: any class variables declared and constructed in the "try" block may leak if you don't delete it before the abort/throw happens. I have made no effort to handle this case.
- Loading branch information
Showing
11 changed files
with
314 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,4 @@ void TripleCrossbow shape#(0x287) () | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.