Would like `should produce` to show message of wrong exception.

14 views
Skip to first unread message

Martin Pärtel

unread,
Mar 14, 2012, 4:43:29 PM3/14/12
to scalate...@googlegroups.com
Hi,

A small feature request: given `evaluating { foo } should produce [SomeException]`, if foo throws something other than SomeException, I'd like to see the exception's message, not just its type.

Also, `should produce` should probably pass through a `org.scalatest.TestFailedException`.

Bill Venners

unread,
Mar 14, 2012, 4:57:48 PM3/14/12
to scalate...@googlegroups.com
Hi Martin,

That's a good suggestion. Same should happen for intercept. I'll try
and add that to the upcoming 1.8 release.

Thanks.

Bill

> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest

--
Bill Venners
Artima, Inc.
http://www.artima.com

Martin Pärtel

unread,
Mar 14, 2012, 5:06:30 PM3/14/12
to scalate...@googlegroups.com
Excellent. Thanks!

Bill Venners

unread,
Apr 7, 2012, 6:46:07 PM4/7/12
to scalate...@googlegroups.com
Hi Martin,

The problem here was actually that I wasn't including the thrown
exception as the TestFailedException's cause when using the
"eventually ... should produce" syntax. This is what I had been doing
in intercept all along. The current 1.8-SNAPSHOT fixes this. Please
give the new 1.8-SNAPSHOT a try and let me know if this works for you.

https://oss.sonatype.org/content/groups/public/org/scalatest/

Thanks.

Bill

On Wed, Mar 14, 2012 at 1:43 PM, Martin Pärtel <martin...@gmail.com> wrote:

Martin Pärtel

unread,
Apr 22, 2012, 10:16:16 AM4/22/12
to scalate...@googlegroups.com
Works nicely in RC1. Thanks and sorry for taking so long to respond.

On 04/08/2012 01:46 AM, Bill Venners wrote:
> Hi Martin,
>
> The problem here was actually that I wasn't including the thrown
> exception as the TestFailedException's cause when using the
> "eventually ... should produce" syntax. This is what I had been doing
> in intercept all along. The current 1.8-SNAPSHOT fixes this. Please
> give the new 1.8-SNAPSHOT a try and let me know if this works for you.
>
> https://oss.sonatype.org/content/groups/public/org/scalatest/
>
> Thanks.
>
> Bill
>

Reply all
Reply to author
Forward
0 new messages