- This topic has 1 reply, 1 voice, and was last updated 12 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Internals & Enhancements’ is closed to new topics and replies.
Integrated Application Platform
Integrated Application Platform › Forums › Internals & Enhancements › Best Way to Specify Compiler Options ?
One of the recent changes was that unhandled values in a switch statement will throw an exception. Some people are finding this a problem with existing code. (For new code, just include a default: if you want to ignore other values.)
So we should probably have an option to disable this new feature.
The question is how to specify the option:
– a command line option e.g. -switchdefaultthrow
– a function e.g. SetSuneidoOption(switchDefaultThrow: false)
– a special member in the global Suneido object e.g. Suneido.SwitchDefaultThrow = false
Note: the second two would have to be done before any of the applicable code was used
What do you think?
I went with setting a member in the Suneido object because it was the simplest to implement.
We’ll see how it works.