Issue 498: Allow for and pass innerException (#499)

This commit is contained in:
Peter T. LaComb Jr 2020-12-08 15:14:32 -05:00 committed by GitHub
parent 959dd8615b
commit 99aeac3263
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -4,8 +4,16 @@ namespace Elsa.Exceptions
{
public class WorkflowException : Exception
{
public WorkflowException() : base()
{
}
public WorkflowException(string message) : base(message)
{
}
public WorkflowException(string message, Exception innerException) : base(message, innerException)
{
}
}
}
}

View file

@ -37,7 +37,7 @@ namespace Elsa.Expressions
string message = $"Error while evaluating {expression.Syntax} expression \"{expression.Expression}\". Message: {e.Message}";
logger.LogError(e, message);
throw new WorkflowException(message);
throw new WorkflowException(message, e);
}
}
}