Class ExceptionAnalyzer

    • Field Detail

      • statusMessage

        public StringParameter statusMessage
        A status message reflecting the success or failure of actions taken upon occurrence of an exception. Implemented as a public parameter so the message can be displayed in the icon.
    • Constructor Detail

      • ExceptionAnalyzer

        public ExceptionAnalyzer​(NamedObj container,
                                 java.lang.String name)
                          throws IllegalActionException,
                                 NameDuplicationException
        Construct an attribute with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This attribute will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of this attribute.
        Throws:
        IllegalActionException - If the attribute is not of an acceptable class for the container, or if the name contains a period.
        NameDuplicationException - If the name coincides with an attribute already in the container.
    • Method Detail

      • exceptionOccurred

        public boolean exceptionOccurred​(java.lang.String policy,
                                         java.lang.Throwable exception)
        Handle an exception according to the specified policy: analyze: Determine the source actor(s) and annotate output ports with error constraints. others: Delegate to parent class
        Specified by:
        exceptionOccurred in interface ExceptionSubscriber
        Parameters:
        policy - The policy
        exception - The exception that occurred
        Returns:
        true if the solver completed successfully.
      • exceptionHandled

        public boolean exceptionHandled​(boolean succesful,
                                        java.lang.String message)
        Nothing to do after exception is handled. return true always, since there is nothing to do after handling
        Specified by:
        exceptionHandled in interface ExceptionSubscriber
        Parameters:
        succesful - True if the exception was successfully handled; false otherwise
        message - A status message from the exception handler
        Returns:
        True if the subscriber successfully processed the information; false otherwise (for example, an ExceptionEmailer that fails to send an email)