Maybe a static class, ErrorLogger, that can receive feedback from anywhere without the need to pass around a dictionary. Any method that needs to report an error could ping the logger with something like EL.CurrentTask(method.Name). If an error is encountered, issue something like EL.ReportError(method.Name, ErrorString). I guess it would also have to report an exit from the method, too.
The logger would maybe create/maintain a hierarchical structure something like:
Part1.par
OpenSave
Can't save a read only file
Part7.psm
SaveModelAs
(No further messages indicates success)
Asm1.asm
UpdateModelStylesFromTemplate
UpdateDimensionStyles
Unable to update 'ANSI(mm)'
RemoveViewStyles
Unable to remove 'HIDDEN LINE'
It could also capture stack traces from an abort and turn them into a more easily digestible format
Once the run is complete, a request for a report could be issued, possibly including a flag for the format of the output (eg .txt, .csv)
Maybe a static class, ErrorLogger, that can receive feedback from anywhere without the need to pass around a dictionary. Any method that needs to report an error could ping the logger with something like EL.CurrentTask(method.Name). If an error is encountered, issue something like EL.ReportError(method.Name, ErrorString). I guess it would also have to report an exit from the method, too.
The logger would maybe create/maintain a hierarchical structure something like:
Part1.par OpenSave Can't save a read only file Part7.psm SaveModelAs (No further messages indicates success) Asm1.asm UpdateModelStylesFromTemplate UpdateDimensionStyles Unable to update 'ANSI(mm)' RemoveViewStyles Unable to remove 'HIDDEN LINE'
It could also capture stack traces from an abort and turn them into a more easily digestible format
Once the run is complete, a request for a report could be issued, possibly including a flag for the format of the output (eg .txt, .csv)