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

Provide a flag to ignore exception when template generator encounters… #17

Closed
wants to merge 3 commits into from

Conversation

yaverhussain
Copy link

… null to render in StrictMode. This is particularly useful in our upcoming change where in we want to turn StrictMode on but fear we might encounter a lot of such errors in prod.

… null to render in StrictMode. This is particularly useful in our upcoming change where in we want to turn StrictMode on but fear we might encounter a lot of such errors in prod.
@nbubna
Copy link

nbubna commented Aug 25, 2020

I see the flag, but it does not appear to be used to actually do anything.

@yaverhussain
Copy link
Author

I see the flag, but it does not appear to be used to actually do anything.

can see bit now?

@arkanovicz
Copy link
Contributor

Can't you achieve this goal using an InvalidReferenceEventHandler?

@yaverhussain
Copy link
Author

InvalidReferenceEventHandler

That would mean a broader check including invalid method names etc, I still want it to behave like strict mode ON except that swallow an error on rendering null value

…rred in strict mode, make sure we display the variable reference just we would do when strict mode is off
@arkanovicz
Copy link
Contributor

InvalidReferenceHandler

That would mean a broader check including invalid method names etc,

And? I maintain that it's a typical use case for the InvalidReferenceHandler, and that I'm reluctant to include a new flag (unless it is considered as a backward compatibility flag). The strict mode is, well, strict. If you fear for production errors, just use the strict mode in dev and remove it in prod... or use the suggested handler.

@arkanovicz arkanovicz closed this Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants