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

How to send custom exception correctly? #1722

Closed
dimmduh opened this issue Nov 9, 2018 · 3 comments
Closed

How to send custom exception correctly? #1722

dimmduh opened this issue Nov 9, 2018 · 3 comments

Comments

@dimmduh
Copy link

dimmduh commented Nov 9, 2018

I'm doing now

       try {
            throw new FormValidationException(node, input);
        } catch (err) {
            Sentry.captureException(err);
        }

But I feel it's wrong.
Is there any other ways to send custom exception?

@HazAT
Copy link
Member

HazAT commented Nov 9, 2018

Why should this be wrong? This is perfectly fine.

@kamilogorek
Copy link
Contributor

Or just Sentry.captureException(new FormValidationException(node, input)) if you don't need anything inside try block and just want to send custom error.

@kamilogorek
Copy link
Contributor

Main question was answered. Feel free to reopen if still need any help. Cheers!

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

No branches or pull requests

3 participants