Skip to content

When PesterThrow catches an unexpected exception, record the source of the exception into the exception message#147

Merged
nohwnd merged 1 commit intopester:masterfrom
dmonger:print-exception-source
Jun 28, 2014
Merged

When PesterThrow catches an unexpected exception, record the source of the exception into the exception message#147
nohwnd merged 1 commit intopester:masterfrom
dmonger:print-exception-source

Conversation

@dmonger
Copy link
Copy Markdown
Contributor

@dmonger dmonger commented Jun 27, 2014

this captures the invocation info from the original unexpected exception, and incorporates that into the output text, so that it's easier to locate the source of an unexpected exception from the log output.

of the exception into the exception message
nohwnd added a commit that referenced this pull request Jun 28, 2014
When PesterThrow catches an unexpected exception, record the source of the exception into the exception message
@nohwnd nohwnd merged commit e50cbc7 into pester:master Jun 28, 2014
dlwyatt added a commit to dlwyatt/Pester that referenced this pull request Aug 1, 2014
The tests for pester#147 were failing in PowerShell 2.0 due to the presence of a leading blank line in the ErrorRecord's InvocationInfo.PositionMessage property.  This update strips out any whitespace-only lines from PositionMessage before otherwise manipulating and using it in the output, which gets the tests working regardless of PowerShell version.
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

Successfully merging this pull request may close these issues.

2 participants