Commit Graph

19 Commits

Author SHA1 Message Date
Michael Handschuh d709d1c4e0 Update Common to respect CA1304 and CA1305
Updates all occurrences of parsing/ToString-ing to go through the new
StringExtensions methods that use CultureInfo.InvariantCulture

See #3045
2019-09-12 14:13:24 -04:00
Stefano Raggi 57d50c69c4 Fix XML documentation compiler warnings
- Fixed all warnings except for missing XML comments (CS1591)
2018-11-09 11:44:03 +01:00
Stefano Raggi ae419690a6 Exclude mocks in exception interpreter loader 2018-10-02 20:28:11 +02:00
AlexCatarino 3e37693984 Fixes the exception message handling to return the python dll name 2018-06-27 16:31:41 +01:00
AlexCatarino 30263b2a51 Implements catch-all Python Exception Interpreter
Implements `PythonExceptionInterpreter` that works as a "catch-all" exception intrepreter for `PythonException`. Since it can interpret more specific python exceptions that are already covered by other interpreters, its `Order` is set to `int.MaxValue` to be the last to be tested.
2018-03-12 22:32:26 +00:00
AlexCatarino 980411b918 Adds IExceptionInterpreter.Order property
The Order property can be used to give priority on exception interpreters calls.
2018-03-08 17:25:30 +00:00
AlexCatarino 682b312c0f Moves GetStringBetweenChars to Extensions from PythonUtil
Since this method is not exclusive of python algorithms, it is being moved to Extension methods.
2018-03-07 23:24:35 +00:00
AlexCatarino bd9766d4f4 Implements UnsupportedOperandPythonExceptionInterpreter
Users often try to make operations between decimal (prices from securitties) and float.
2018-03-06 13:04:29 +00:00
AlexCatarino 7fc8886803 Implements NoMethodMatchPythonExceptionInterpreter
Users often use the wrong type of method paramenters, for instance, a float instead of an integer.
2018-03-06 12:10:16 +00:00
AlexCatarino b672580693 Implements KeyErrorPythonExceptionInterpreter 2018-03-06 11:05:39 +00:00
AlexCatarino 27198eda7a Implements InvalidTokenPythonExceptionInterpreter
This exception interpreter interprets a SyntaxError due to invalid token in python scripts
2018-03-05 22:55:11 +00:00
AlexCatarino 718c1d61c8 Implements DllNotFoundPythonExceptionInterpreter
This exception interpreter interprets a DllNotFoundException that is thrown when pythonnet cannot fing the python dynamic-link library in the system.
2018-03-05 22:55:11 +00:00
Michael Handschuh 6c151993ea Format errors w/ header line and detail on following lines
We format the message before being set to the result handler's log message
method so it ends up being outputted as we wish. The desired output is a
header line with the collated message from the exception (including inners)
followed by the full exception detail (inner stack traces and all).
2018-03-02 16:16:46 -05:00
Michael Handschuh d74a80448a Remove duplicat message from sched event interpreter
Also fixes test type name from recent name change projection -> interpreter
2018-03-02 15:26:40 -05:00
Michael Handschuh fa1ea521b1 Catch stragglers from recent rename, projection -> interpreter 2018-03-01 12:36:00 -05:00
Michael Handschuh 5623659098 Add StackExceptionInterpreter.ToString and null interpreter for tests 2018-03-01 12:36:00 -05:00
Michael Handschuh 148ae5986a Rename projections -> interpreters 2018-03-01 12:36:00 -05:00
Michael Handschuh 985d53a662 Implement recursive exception projections
Often times exceptions are wrapped in other exceptions that are potentially
wrapped in other exceptions (ad. infinum) -- this lends itself to a recursive
strategy for projecting exception instances. This change aims to make exception
projections composable for easy consumption by a recursive algorithm by adding
an innerProjection parameter to IExceptionProject.Project. The individual impl
can decide whether or not it wants to project the inner exception. Additionally,
it can project it using custom logic or using the specified innerProjection, or
it could ignore it completely. The implementations have all the decision making
power.
2018-03-01 12:36:00 -05:00
Michael Handschuh c8f20b7756 Add IExceptionProjection infrastructure
Provides a sample implementation of IExceptionProjection that
prepends the scheduld event name to the error message

 #1630
2018-03-01 12:36:00 -05:00