Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Keywords

ERROR

Purpose


Excerpt
Immediately terminate an instruction with exit code "Error" with a custom error message.


Description


Multiexcerpt
MultiExcerptNameSYNTAX


Code Block
languagejava
titleSyntax
//some statements
ERROR "custom error message";

ERROR causes an instruction to terminate with exit code of 2 meaning “Error” and the specified custom error message. The error message must be supplied as a string literal, and cannot be a reference to a variable or any other kind of expression.


Examples


Multiexcerpt
MultiExcerptNameEXAMPLE


Code Block
languagesql
@svcs = OperatingSystem.GetServiceInfo();
@nomad = SELECT * FROM @svcs WHERE Name = "NomadBranch";

IF NOT (@nomad)
    ERROR "1E Nomad is not available";
ENDIF;

// Otherwise do some work with 1E Nomad...





Notes