Error Handling
[[toBeAdded]]
[[isInNewCommits]]
When you're writing a library or an utility in ISI, it would be
unconvenient to write errors as if statements with logging, custom error handling
and writing everything again.
That's why the '
throw' function WILL BE introduced in ISI [[isiVersionCommit:A3]]
Using the throw function is simple, you just do this:
int x = 8;
if (x < 128){
throw("Variable x is smaller than 128", -1);
}
The throw function takes two arguments, but only the first one is required.
The first argument is a
string, which is the message that gets printed
if the error won't be caught.
The second argument is an
int, which is the error code that gets returned.
[[docVersion]] [[isiVersionCommit:A2]]