mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix(ThreadedWorkerQueue): Exception handling of exceptions in process action
This commit is contained in:
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- IcdEnvironment - Added CrestronDevicePlatform, removed from CrestronRuntimeEnvironment, to support SimplWindows on VC-4
|
- IcdEnvironment - Added CrestronDevicePlatform, removed from CrestronRuntimeEnvironment, to support SimplWindows on VC-4
|
||||||
- Fixed IcdEnvironment CrestronRuntimeEnvironment uses in IcdConsole, PathUtils, and ProgramUtils
|
- Fixed IcdEnvironment CrestronRuntimeEnvironment uses in IcdConsole, PathUtils, and ProgramUtils
|
||||||
- Fixed preprocessors in IcdDirectory
|
- Fixed preprocessors in IcdDirectory
|
||||||
|
- Added exception handling to ThreadedWorkerQueue
|
||||||
|
|
||||||
## [16.0.5] 2022-07-11
|
## [16.0.5] 2022-07-11
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Collections;
|
using ICD.Common.Utils.Collections;
|
||||||
|
using ICD.Common.Utils.Services;
|
||||||
|
using ICD.Common.Utils.Services.Logging;
|
||||||
using ICD.Common.Utils.Timers;
|
using ICD.Common.Utils.Timers;
|
||||||
|
|
||||||
namespace ICD.Common.Utils
|
namespace ICD.Common.Utils
|
||||||
@@ -370,7 +372,15 @@ namespace ICD.Common.Utils
|
|||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
// Run the process action
|
// Run the process action
|
||||||
m_ProcessAction(item);
|
// todo: Have exceptions raise an event in a new thread, maybe configurable exception handling
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_ProcessAction(item);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
ServiceProvider.GetService<ILoggerService>().AddEntry(eSeverity.Error, e, "Exception in ThreadedWorkingQueue process action:{0}", e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
m_QueueSection.Enter();
|
m_QueueSection.Enter();
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user