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

[5.5] Mix() won't throw an exception #20603

Merged
merged 12 commits into from
Aug 20, 2017
Merged

[5.5] Mix() won't throw an exception #20603

merged 12 commits into from
Aug 20, 2017

Conversation

adampatterson
Copy link
Contributor

I am not 100% confident that I am using report() correctly but I am getting what I expected as the outcome.

I added report() to mix(). In both cases, Sentry collected an entry, and with debut turned off Loggly also collected an entry.

Debug = False

<link rel="stylesheet" href="{{ mix('/static/css/basemissing.css')}}">

image

Debug = True

<link rel="stylesheet" href="{{ mix('/static/css/basemissing.css')}}">

image

ref #20376

@taylorotwell
Copy link
Member

You still have log in there. Remove any reference to logging entirely. Report will take care of that.

@taylorotwell
Copy link
Member

It still throws an uncaught exception earlier in the method. Is this intentional? Also, don't see what this has to do with debug mode even though the title to this PR mentions debug mode.

@adampatterson adampatterson changed the title [5.5] Mix() won't throw an exception when debug is false [5.5] Mix() won't throw an exception Aug 17, 2017
@adampatterson
Copy link
Contributor Author

@taylorotwell sorry. I miss understood your previous comment. The original use case was to allow mix() to return the invalid resource that was passed through and not throw an exception. That is why I had debugged mode in there.

At the moment when using report() no exception is thrown. So I have questions around how to properly use report(). How will others who thought that the exception should be thrown be able to handle their expected outcome?

I have limited knowledge of how to do good error handling but I am guessing that a custom exception for Mix needs to be made and thrown so that it can optionally be handled by developers as they see fit.

If that is the case then I will close this PR and give that a try.

@taylorotwell
Copy link
Member

@adampatterson report() calls the report() method of your Exception Handler. So the exception will still be reported to your logs or Sentry or Bugsnag or whatever else you do in your exception handler's report method.

@taylorotwell taylorotwell merged commit 0d450fb into laravel:master Aug 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants