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?
Why should this be wrong? This is perfectly fine.
Or just Sentry.captureException(new FormValidationException(node, input))
if you don't need anything inside try
block and just want to send custom error.
Main question was answered. Feel free to reopen if still need any help. Cheers!
Most helpful comment
Or just
Sentry.captureException(new FormValidationException(node, input))
if you don't need anything insidetry
block and just want to send custom error.