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

Rollbar:log() does not deliver content of \PDOException exceptions #491

Open
djibarian opened this issue May 29, 2020 · 3 comments
Open
Labels
Rank: 3 - Minor Tackle when there are no actionable Critical or Major requests. Status: 1 - Discussion Stakeholders are discussing the scope and characteristics of the request. Type: Bug Fix a component so that its behavior aligns with its documentation.

Comments

@djibarian
Copy link

In the following code

try{
  blah();
}
catch(Exception $e){
  Rollbar::log(Level::ERROR, “this is sent”);
  Rollbar::log(Level::ERROR, $e); /* this is not */
}

the first log is sent to Rollbar, but not the second. I can’t figure out what is wrong there. Removing the catch or throwing inside it does the same, the exception is not sent (intentionally raised by causing a syntax error).

@djibarian
Copy link
Author

djibarian commented May 29, 2020

I have more data: $e is of type PDOException. That seems to be the cause as if I convert it to throw new Exception($e->getMessage()) the error shows up in Rollbar. But why Rollbar is not sending it originally?

@bishopb bishopb changed the title Error not sent Rollbar:log() does not deliver content of \PDOException exceptions Dec 3, 2020
@bishopb bishopb added Rank: 3 - Minor Tackle when there are no actionable Critical or Major requests. Status: 1 - Discussion Stakeholders are discussing the scope and characteristics of the request. Type: Bug Fix a component so that its behavior aligns with its documentation. labels Dec 3, 2020
@bishopb
Copy link
Contributor

bishopb commented Dec 3, 2020

Interesting! Definitely should, as forwarding an Exception is straight out of the documentation.

What version of PHP were you using?

@djibarian
Copy link
Author

PHP 7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rank: 3 - Minor Tackle when there are no actionable Critical or Major requests. Status: 1 - Discussion Stakeholders are discussing the scope and characteristics of the request. Type: Bug Fix a component so that its behavior aligns with its documentation.
Projects
None yet
Development

No branches or pull requests

2 participants