You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

#ifdef DEBUG
  // do something for debug 
#else
  // do something else
#endif

Or you can make a method depend on release vs debug using a conditional.

[Conditional("RELEASE") ]

In general try catch all is considered bad practice.

  • No labels