CrabDude/trycatch — pull request #1 by jeffbski (2011-11-11 21:11:43+00:00)
Title: TypeError occurs if non-Error object is thrown and stack is undefined

If a non-Error object is thrown like string, number, boolean, etc.
a stack will not be available.

filterInternalFrames() was calling split on the frames array which
ends up being undefined and this causes an error.

trycatch.js filterInternalFrames() line 97

TypeError: Cannot call method 'split' of undefined

The fix is to simple check if frames is defined before continuing and
if not, then simply return empty string.

Run the included test by running:

```bash
node test/throw-string.test.js
```