Version: 4
restore

Contents

Keywords

ERROR

Purpose

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

Description

Syntax
//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

@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