mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-14 13:07:28 +00:00
fix(ThreadedWorkerQueue): Exception handling of exceptions in process action
This commit is contained in:
parent
2700f5018a
commit
2aa05f3ee8
2 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||||
|
// todo: Have exceptions raise an event in a new thread, maybe configurable exception handling
|
||||||
|
try
|
||||||
|
{
|
||||||
m_ProcessAction(item);
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue