Class Error
- Namespace
- BotManager.Runtime.Expressions
- Assembly
- BotManager.Runtime.dll
Writes a log message to the error output.
Return type is null.
null:
{ "$Error": "This is an error!" }
[JsonConverter(typeof(ErrorConverter))]
public sealed class Error : IExpression
- Inheritance
-
Error
- Implements
- Inherited Members
Constructors
Error()
Empty constructor for serialization.
public Error()
Error(IExpression?)
Creates an expression that logs the given message in the error output.
public Error(IExpression? message)
Parameters
messageIExpressionThe expression to resolve the log message.
Properties
Message
Gets and sets the expression to resolve the message to log as error.
[JsonRootProperty]
public IExpression? Message { get; set; }
Property Value
Methods
ExecuteAsync(RuntimeContext, Type?)
Executes the expression in the given RuntimeContext. Please do not use this method to run an expression. Use ExecuteAsync(IExpression?) instead.
public Task<object?> ExecuteAsync(RuntimeContext context, Type? returnType)
Parameters
contextRuntimeContextThe current runtime context.
returnTypeTypeThe expected return type. Use
typeof(object)for a generic result. Usenullif you don't need the return value.