Auto Light Dark
Auto Light Dark
German English

isType

Versionshinweise

21.2

Code

boolean ScriptUtils.isType(ScriptingException exception, String... types)

Beschreibung

Prüft, ob die Exception zu einem der als Parameter übergebenen Typen passt.

Parameter

  • exception - Die ScriptingException, deren Typ geprüft werden soll.

  • types - Die Typen die geprüft werden sollen.

Rückgabe

true, wenn einer der Typen zur ScriptingException passt, sonst false .

Beispiele

Java
try
{
  throw new ScriptingException("Test");
}
catch(ScriptingException e)
{
  boolean isType = ScriptUtils.isType(e, 
    ExceptionTypeConstants.DOC_ERRORCODE_TEMPLATE_NOT_NATIVE,
    ExceptionTypeConstants.DOC_ERRORCODE_TEMPLATE_NOT_VALID);
  ...
}