Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Luis MajanoLuis MajanoReporter
Sean CorfieldSean CorfieldComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Luis Majano
Luis MajanoReporter
Sean Corfield
Sean CorfieldComponents
Fix versions
Affects versions
Priority
Sentry
Sentry
Sentry
Created December 26, 2013 at 1:14 AM
Updated January 14, 2014 at 7:43 PM
Resolved January 14, 2014 at 5:28 PM
ColdSpring throws coldspring.NoSuchBeanDefinition when you request a non-existent bean, e.g., Wibble, but it uses an empty message and a detail of "Bean definition for bean named: Wibble could not be found."
Assertion.throws() will not match any empty message: reFindNoCase( "", "" ) returns zero, as does reFindNoCase( "^$", "" ) so it seems that a special case is needed for e.message.
In addition, you can't match on the detail of an exception at all which means you can't differentiate between two similar exceptions.
I'm not quite sure what the best solution is here. I'd be tempted to change both calls of
reFindNoCase( arguments.regex, e.message )
to( reFindNoCase( arguments.regex, e.message ) || reFindNoCase( arguments.regex, e.detail ) )
. That would solve the immediate problem insofar as you could then match on detail OR message.Longer term, adding support for matching detail separately and special-casing for message / detail being empty strings would probably be a better solution.
Thoughts?
FWIW, I made the simple change locally of testing regex against message or detail and that's working nicely for me.