deepakkumar1984 / MxNet.Sharp

.NET Standard bindings for Apache MxNet with Imperative, Symbolic and Gluon Interface for developing, training and deploying Machine Learning models in C#. https://mxnet.tech-quantum.com/
Apache License 2.0
148 stars 8 forks source link

Make Logging.ThrowException a writable property and set its default value to true #25

Closed horker closed 4 years ago

horker commented 4 years ago

In the current implementation, errors that are raised from native methods show error messages and continue code execution. In my experience, most of such errors are critical and ignoring them often results in more serious errors like AccessViolationException, which means that the native code has crashed somewhere. This doesn't seem to be safe for average users.

This PR will make Logging.ThrowException a writable property and set its default value to true. By this change, errors from native methods will cause exceptions by default, and knowledgeable users can change its behavior by setting the property value to false.