Final Class: ValidatorError

Oracle® JavaScript Extension Toolkit (JET)
9.0.0

F24343-01

QuickNav

ValidatorError

Version:
  • 9.0.0
Since:
  • 0.6.0
Module:
  • ojvalidation-error

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//This class is not exported from module and can not be accessed in runtime.
//However to enable typechecking and ducktyping, you can access it as an interface.
import {ValidatorError} from "ojs/ojvalidation-error";

//To access this type in your code,
class MyClass implements ValidatorError{
//or,
let myVariable: ValidatorError;

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Final classes in JET

Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.

Constructor

new ValidatorError(summary, detail)

Constructs a ValidatorError instance from a summary and detail
Parameters:
Name Type Description
summary string a localized String that provides a summary of the error
detail string a localized String that provides a detail of the error

Methods

getMessage() : {oj.Message}

Returns an Object that duck-types oj.Message which is an Object with summary, detail, and severity properties. The severity is oj.Message.SEVERITY_LEVEL['ERROR']
Returns:
an Object that duck-types oj.Message which is an Object with summary, detail, and severity properties. The severity is oj.Message.SEVERITY_LEVEL['ERROR']
Type
oj.Message