When a program runs in release mode you usually wanna catch all errors. When it doesn't you just wanna let it crash.
To make a function depend on debug vs release you can use 2 methods:
Using precompile statements
Code Block |
---|
#if DEBUG // do something for debug #else // do something else #endif |
Or you can make a method depend on release vs debug using a conditional.
Code Block |
---|
[Conditional("RELEASE") ] |
In general try catch all is considered bad practice.