getStatusLevel

The getStatusLevel method returns the status level of an Advisory Message object.

getStatusLevel()

Return value

The Advisory Message object returns an integer.

  • 0 - STATUS_LEVEL_SUCCESS-The method called completed with no errors.
  • 1 - STATUS_LEVEL_WARNING-The method called completed with at least one warning (but no errors).
  • 2 - STATUS_LEVEL_ERROR-The method called did not complete successfully and has at least one error.

Example

The following method prints out the status level of an AdvisoryMessage object.

public static void printMessageCodeOfWarningOrError(String command,AdvisoryMessage[] messages)
    {
        System.out.println("Calling "+command);
        for(AdvisoryMessage msg : messages)
        {
            System.out.println(msg.getStatusLevel());