Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation


pentaho.lang. ArgumentRequiredError

The ArgumentRequiredError class is the class of errors for a function's argument that was required but was not specified, or was specified but with a nully or empty value.

The name of the argument can be that of a nested property. For example: "keyArgs.description".

An argument being "required" may mean that an argument must be:

  • Specified: if(arguments.length <&nbsp;1) ...
  • Truthy: if(!value) ...
  • Not nully: if(value == null) ...
  • Not nully or an empty string: if(value == null || value === "") ...

AMD Module

require(["pentaho/lang/ArgumentRequiredError"], function(ArgumentRequiredError) { /* code goes here */ });



Name Description
new ArgumentRequiredError(name, text)

Creates a required argument error object.


Name Description
name :  string

The name of the type of error.

Constructor Details

new ArgumentRequiredError(name, text)

Creates a required argument error object.

Source: javascript/web/pentaho/lang/ArgumentRequiredError.js, line 25

Name Default Value Summary
name : string

The name of the argument.

text : string

Optional text further explaining the reason why the argument is required. Can be useful when "being required" is a dynamic rule.


define(["pentaho/lang/ArgumentRequiredError"], function(ArgumentRequiredError) {

 function connect(channel) {

 if(channel && channel.isOpened) {
 throw new ArgumentRequiredError("channel", "Channel not free to use.");

 var handle =;
 // ...

 // ...

Members Details

name:  string

The name of the type of error.

Source: javascript/web/pentaho/lang/ArgumentRequiredError.js, line 79

Default Value: "ArgumentRequiredError"

Overrides: pentaho.lang.ArgumentError#name