Search Results for

    Show / Hide Table of Contents

    Class ExceptionMessage

    This message is send whenever there is an exception during the execution of an Agent.

    Inheritance
    Object
    Message
    ExceptionMessage
    Implements
    IDisposable
    Inherited Members
    Message.Id
    Message.ReplaceWith(Message)
    Message.SetChild(Message)
    Message.Is<T>()
    Message.Get<T>()
    Message.TryGet<T>(T)
    Message.MessageDomain
    Message.ToString()
    Message.Equals(Message)
    Message.Equals(Object)
    Message.GetHashCode()
    Message.DelayDispose()
    Message.Dispose(Boolean)
    Message.Dispose()
    Message.ToMessageLog()
    Namespace: Agents.Net
    Assembly: Agents.Net.dll
    Syntax
    public class ExceptionMessage : Message, IDisposable
    Remarks

    When there is a known error state in an Agent it should send the exception message directly because it is faster than throwing an exception and catching it again.

    No one will handle these messages by default. That means, that the program will continue to be executed even after an exception occured. In order to change that behavior an Agent must be defined which handles these messages and decides when to stop the program. For that exceptions are captured with their respective . With that the exception can be recreated together with the stacktrace by calling .

    Constructors

    | Improve this Doc View Source

    ExceptionMessage(ExceptionDispatchInfo, Message, Agent)

    Initialized a new instance of the class ExceptionMessage with a captured exception.

    Declaration
    public ExceptionMessage(ExceptionDispatchInfo exceptionInfo, Message message, Agent agent)
    Parameters
    Type Name Description
    ExceptionDispatchInfo exceptionInfo

    The captured exception info.

    Message message

    The predecessor message.

    Agent agent

    The agent that produced the exception.

    | Improve this Doc View Source

    ExceptionMessage(ExceptionDispatchInfo, IEnumerable<Message>, Agent)

    Initialized a new instance of the class ExceptionMessage with a captured exception.

    Declaration
    public ExceptionMessage(ExceptionDispatchInfo exceptionInfo, IEnumerable<Message> messages, Agent agent)
    Parameters
    Type Name Description
    ExceptionDispatchInfo exceptionInfo

    The captured exception info.

    IEnumerable<Message> messages

    The predecessor messages.

    Agent agent

    The agent that produced the exception.

    | Improve this Doc View Source

    ExceptionMessage(String, Message, Agent)

    Initialized a new instance of the class ExceptionMessage with a custom message.

    Declaration
    public ExceptionMessage(string customMessage, Message message, Agent agent)
    Parameters
    Type Name Description
    String customMessage

    The custom exception text.

    Message message

    The predecessor message.

    Agent agent

    The agent that produced the exception.

    | Improve this Doc View Source

    ExceptionMessage(String, IEnumerable<Message>, Agent)

    Initialized a new instance of the class ExceptionMessage with a custom message.

    Declaration
    public ExceptionMessage(string customMessage, IEnumerable<Message> messages, Agent agent)
    Parameters
    Type Name Description
    String customMessage

    The custom exception text.

    IEnumerable<Message> messages

    The predecessor messages.

    Agent agent

    The agent that produced the exception.

    Properties

    | Improve this Doc View Source

    Agent

    The agent which produced the exception.

    Declaration
    public Agent Agent { get; }
    Property Value
    Type Description
    Agent
    | Improve this Doc View Source

    CustomMessage

    Get the custom exception message.

    Declaration
    public string CustomMessage { get; }
    Property Value
    Type Description
    String
    Remarks

    When an exception is captured, this value is null.

    | Improve this Doc View Source

    ExceptionInfo

    Get the captured .

    Declaration
    public ExceptionDispatchInfo ExceptionInfo { get; }
    Property Value
    Type Description
    ExceptionDispatchInfo
    Remarks

    With that the exception can be recreated together with the stacktrace by calling .

    It can be null, when the CustomMessage is used instead.

    Methods

    | Improve this Doc View Source

    DataToString()

    Overridden data method.

    Declaration
    protected override string DataToString()
    Returns
    Type Description
    String

    Overrides
    Message.DataToString()
    Remarks

    This is not used as exception messages are locked differently than normal messages.

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright Tobias Wilker and contributors