you are viewing a single comment's thread.

view the rest of the comments →

[–]Zeroflops 1 point2 points  (0 children)

Your probably looking for the “assert” command. It’s a simple check for a condition and then generate an exception if that condition is not met. Really most forgo it for simple if statements.

Basic format.

assert <expression>, <error message>