Package com.orchestranetworks.addon.dama.ext.exception


package com.orchestranetworks.addon.dama.ext.exception

Supplies a class to define the result of an operation's execution and allows you to define an exception for the add-on.

  1. Register DAMException:

            //Instantiates a new DAM exception by an exception
            DAMException damException = new DAMException(aException);
            
            //Instantiates a new DAM exception by a user message
            DAMException damException1 = new DAMException(aUserMessage);
            
            //Instantiates a new DAM exception by a string message
            DAMException damException2 = new DAMException("aString");
            
            //Gets the user message for the exception
            UserMessage userMessage = damException.getUserMessage();
            
            //Gets the message string by locale
            String message = damException.getMessage(Locale.ENGLISH);
            
  2. Register OperationExecutionStatus:

            //Instantiates a failed operation execution status
            OperationExecutionStatus operationExecutionStatus = new OperationExecutionStatus(damException);
            
            //Instantiates a successful operation execution status
            OperationExecutionStatus operationExecutionStatus = new OperationExecutionStatus();
            
            //Checks the execution status
            boolean hasFailed = operationExecutionStatus.hasFailed();
            
            //Gets the execution exception, returns null if no exception is thrown
            DAMException damException = operationExecutionStatus.getException();