Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default ErrorAction behavior to ThrowError #51

Closed
scottrippey opened this issue Mar 18, 2015 · 5 comments
Closed

Change default ErrorAction behavior to ThrowError #51

scottrippey opened this issue Mar 18, 2015 · 5 comments
Labels

Comments

@scottrippey
Copy link
Contributor

In "Release" mode, the default ErrorAction is Ignore.
This often results in a lot of confusion, especially since NuGet delivers the Release build.
So, a better default ErrorAction should be chosen.

Choices are Ignore, ThrowError, MaintainTokens, or OutputErrorInResult.

In "Debug" mode, the default ErrorAction is ThrowError, which is appropriate.

@scottrippey
Copy link
Contributor Author

I think that OutputErrorInResult might be the best choice, or perhaps MaintainTokens.
@SeriousM Any opinion?

@mikasoukhov
Copy link

Hi Scott! I've do some details into closed issue #50 Think the problem in SmartFormat still is

@mikasoukhov
Copy link

ThrowError. Release mode and Debug shouldn't have different behaviors except logging level and performance.

@scottrippey
Copy link
Contributor Author

@mikasoukhov That's a really good recommendation. I agree, there shouldn't be a difference, My original justification was that I wanted Release mode to be very forgiving. However, now that it's on NuGet in Release mode, people are debugging with it in Release mode, which is a bad experience.
I think I'll change the default to ThrowError, because that should be the most helpful and the expected default behavior.

@scottrippey scottrippey changed the title Change default ErrorAction behavior Change default ErrorAction behavior to ThrowError Mar 27, 2015
@axunonb
Copy link
Member

axunonb commented Nov 27, 2016

Formatter and Parser have ErrorAction = ErrorAction.Ignore in debug and release configuration now:
942e334
Subscribe to events OnFormattingFailure of SmartFormatter or OnParsingFailure of Parser in order to register ALL errors (not only the first) while not throwing an exception.

@axunonb axunonb closed this as completed Nov 27, 2016
axunonb pushed a commit to axunonb/SmartFormat that referenced this issue Dec 5, 2021
…replaceat

Add ReplaceAt method to Utf16ValueStringBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants