Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Conversation

stevecavanagh
Copy link

This PR replaces #3544. The dateParser will throw an exception for an invalid format string as suggested.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two tests with the same name?

@wesleycho
Copy link
Contributor

There is the question whether it is desirable to throw - Angular has a philosophy of allowing some failures to be silent, such as an Angular expression that fails to execute since the function is undefined.

Thoughts?

@nbering
Copy link

nbering commented Apr 27, 2015

As a consumer of angular libraries, I have found that I expect my invalid input to fail silently, and if something is not behaving as expected I watch my own code.

I expect warnings if I'm using something that is deprecated, errors if something fails catastrophically in the architecture of my app, and that's about it.

If user input is invalid, I think that should fail silently unless the developer has set up form validation.

@realityking
Copy link
Contributor

Since the format string will be set most of the time by the developer, I think a fatal error is appropriate. If this turns out to be a problem for someone, a configuration option could be added.

Angular's silence on errors is sometimes a real brain teaser, it'd be good not to take this further.

@stevecavanagh
Copy link
Author

I will clean up the formatting in my PR and resubmit in the next day or so.

---- Rouven Weßling wrote ----

Since the format string will be set most of the time by the developer, I think a fatal error is appropriate. If this turns out to be a problem for someone, a configuration option could be added.

Angular's silence on errors is sometimes a real brain teaser, it'd be good not to take this further.


Reply to this email directly or view it on GitHub.

@stevecavanagh
Copy link
Author

Please close in favor of #3690.

@rvanbaalen
Copy link
Contributor

As requested.

@stevecavanagh
Copy link
Author

Please consider #3691 as a replacement for this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants