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

Details of inner exceptions are not displayed in console output #187

Open
triangular-sneaky opened this issue Apr 26, 2017 · 2 comments
Open
Labels

Comments

@triangular-sneaky
Copy link

Inner exception details for both example and context exceptions are ignored.

We might need to consider using (or mimic) Exception.ToString instead of outputting stack trace and message separately.

Reproduce (NSpec 3.0.7):

public class illustrate_ContextInnerExceptionLost : nspec
    {
        public void given_FailureWithInnerException ()
        {
            act = () => { throw new Exception("Ctx:Outer", new Exception("Ctx:Inner")); };

            it["should display both inner and outer"] = () => { throw new Exception("Example:Outer", new Exception("Example:Inner"));} ;
        }
    }

Actual: Ctx:Inner or Example:Inner don't appear in console output:

**** FAILURES ****
nspec. illustrate ContextInnerExceptionLost. given FailureWithInnerException. should display both inner and outer.
Context Failure: Ctx:Outer, Example Failure: Example:Outer
   at nspec_debug.illustrate_ContextInnerExceptionLost.<>c.<given_FailureWithInnerException>b__0_0() in C:\_dev\other\nspec-debug\illustrate_ContextInnerExceptionLost.cs:line 13
@amirrajan
Copy link
Collaborator

Relevant

@BrainCrumbz BrainCrumbz added the rfc label Jul 3, 2017
@BrainCrumbz
Copy link
Collaborator

@Dpoznyak just to let you know I'm going to close this shortly for inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants