bcoe/sandcastle — pull request #42 by 86chenjie (2014-10-05 09:19:13+00:00)
Title: fix exception

fix for exception when exit(null) in exports.main function.
exception msg is below
"err":{"message":"Cannot read property 'error' of null","name":"TypeError","stack":"TypeError: Cannot read property 'error' of null\n at Script.onExit (/mnt/test/app/node_modules/sandcastle/lib/script.js:107:19)\n at BufferStream. (/mnt/test/app/node_modules/sandcastle/lib/script.js:85:13)\n at BufferStream.emit (events.js:98:17)\n at BufferStream.split (/mnt/test/app/node_modules/sandcastle/node_modules/bufferstream/lib/buffer-stream.js:42:12)\n at BufferStream.write (/mnt/test/app/node_modules/sandcastle/node_modules/bufferstream/lib/buffer-stream.js:210:17)\n at BufferStream.write (/mnt/test/app/node_modules/sandcastle/node_modules/bufferstream/lib/buffer-stream.js:3:61)\n at Socket. (/mnt/test/app/node_modules/sandcastle/lib/script.js:90:14)\n at Socket.emit (events.js:95:17)\n at Socket. (_stream_readable.js:748:14)\n at Socket.emit (events.js:92:17)"},"msg":"Cannot read property 'error' of null","time":"2014-10-05T09:10:13.992Z","v":0}