Scoped GlideSystem - error(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)

Writes an error message to the system log.

This method accepts up to five variable arguments (varargs) in the message using the Java MessageFormat placeholder replacement pattern.

Table 1. Parameters
Name Type Description
message String The log message with place holders for any variable arguments.
param1 Object (Optional) First variable argument.
param2 Object (Optional) Second variable argument.
param3 Object (Optional) Third variable argument.
param4 Object (Optional) Fourth variable argument.
param5 Object (Optional) Fifth variable argument.
Table 2. Returns
Type Description
void
gs.error("This is an error message");
var myFirstName = "Abel";
var myLastName = "Tuter";
gs.error("This is an error message from {0}.{1}", myFirstName, myLastName);
Output:
This is an error message
This is an error message from Abel.Tuter