mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Catch Request/Event handler errors at dispatcher level (#1610)
* Catch Request/Event handler errors at dispatcher level * Fix tests * Use Exception overload of SendError * Fix tests
This commit is contained in:
@@ -263,6 +263,12 @@ namespace Microsoft.SqlTools.Utility
|
||||
/// <param name="logMessage">The message text to be written.</param>
|
||||
public static void Error(string logMessage) => Write(TraceEventType.Error, logMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Writes an exception to the log file with the Error event level
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
public static void Error(Exception exception) => Write(TraceEventType.Error, exception.ToString());
|
||||
|
||||
/// <summary>
|
||||
/// Writes a message to the log file with the Critical event level
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user