diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index ee96a77a5..4e00474f4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -155,7 +155,18 @@ namespace Tango.PPC.Common.EventLogging /// <param name="e">The <see cref="PrintingFailedEventArgs"/> instance containing the event data.</param> private void MachineOperator_PrintingFailed(object sender, PrintingFailedEventArgs e) { - Log(EventTypes.JOB_FAILED, e.Exception.Message); + String eventInfo = String.Empty; + + if (e.Exception is Transport.ResponseErrorException responseError) + { + if (responseError.Container.EventCode > 0) + { + EventTypes evType = (EventTypes)responseError.Container.EventCode; + eventInfo = "\n#" + responseError.Container.EventCode + " " + evType.ToDescription(); + } + } + + Log(EventTypes.JOB_FAILED, e.Exception.Message + eventInfo); } /// <summary> |
