- This commit is related to PR 19 in QC/pythonnet
- C# decimal will be cast to C# double and converted into python
float
- Adding new `decimal.py` into the python algorithm project. This is
required for backwards compatibility with users performing operations
over expected decimal types (like `Price`)
- Updating two python regression test algorithms using custom python
execution models to be aware and ignore floating point precision errors
when handling order sizing.
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.
Use interpreter.GetMessageHeader(e) instead of e.Message to produce to collated exception message containing the messages from inner exceptions.
Add the DllNotFoundPythonExceptionInterpreterTests to the test project.
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).
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.