зеркало из https://github.com/microsoft/MIMWAL.git
Instrumentation - Dumping function parameter values when a function throws an unhandled exception.
This commit is contained in:
Родитель
0d8727a37c
Коммит
e419078664
|
@ -7,11 +7,11 @@ All notable changes to MIMWAL project will be documented in this file. The "Unre
|
|||
* Support for multi-valued attributes in `[//Effective]` lookup in AuthZ workflows.
|
||||
* Implement Approve Request Activity.
|
||||
|
||||
### Version 2.17.0322.0
|
||||
### Version 2.17.0414.0
|
||||
|
||||
#### Added
|
||||
|
||||
* Support for executing SQL stored procedures and queries with the implementation of following new functions:
|
||||
* Support for executing SQL stored procedures and queries for SQL Server and ODBC Data Sources with the implementation of following new functions:
|
||||
* New function [CreateSqlParameter][CreateSqlParameterFunction]
|
||||
* New function [CreateSqlParameter2][CreateSqlParameter2Function]
|
||||
* New function [ExecuteSqlNonQuery][ExecuteSqlNonQueryFunction]
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
|
|||
/// Build Number (MMDD)
|
||||
/// Revision (if any on the same day)
|
||||
/// </summary>
|
||||
internal const string Version = "2.17.0322.0";
|
||||
internal const string Version = "2.17.0414.0";
|
||||
|
||||
/// <summary>
|
||||
/// File Version information for the assembly consists of the following four values:
|
||||
|
@ -31,6 +31,6 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary
|
|||
/// Build Number (MMDD)
|
||||
/// Revision (if any on the same day)
|
||||
/// </summary>
|
||||
internal const string FileVersion = "2.17.0322.0";
|
||||
internal const string FileVersion = "2.17.0414.0";
|
||||
}
|
||||
}
|
|
@ -350,7 +350,45 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionRunUnknownFunctionExecutionError, new InvalidFunctionOperationException(Messages.ExpressionFunction_UnknownFunctionExecutionError, this.mode.ToString().ToLowerInvariant(), ex, this.function, ex.Message));
|
||||
// dump all function parameters in an error log entry
|
||||
string paramString = string.Empty;
|
||||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.parameters != null && this.parameters.Count > 0)
|
||||
{
|
||||
for (var i = 0; i < this.parameters.Count; ++i)
|
||||
{
|
||||
var parameter = this.parameters[i];
|
||||
paramString += "'";
|
||||
if (parameter != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
paramString += Convert.ToString(parameter) + "',";
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// let it print without the ending single quote as an indication of the conversion failure
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
paramString += "',";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
paramString = "(" + paramString.TrimEnd(',') + ")";
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// do nothing - silenty ignore
|
||||
}
|
||||
}
|
||||
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionRunUnknownFunctionExecutionError, new InvalidFunctionOperationException(Messages.ExpressionFunction_UnknownFunctionExecutionError, this.mode.ToString().ToLowerInvariant(), ex, this.function + paramString, ex.Message));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче