Skip to content

Commit ab80667

Browse files
committed
only track preprocessor errors if raven_client exists
1 parent 131794d commit ab80667

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/preprocessor.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ var Preprocessor = function( preprocessor_path, options ){
3434
// so log them here
3535
if( err ){
3636
logger.log( 'Preprocessor Error:\n'+ err.stack, 0 );
37-
raven_client.captureError( err, {
38-
extra: {
39-
context: context
40-
}
41-
});
37+
if( raven_client ){
38+
raven_client.captureError( err, {
39+
extra: {
40+
context: context
41+
}
42+
});
43+
}
4244
if( callback ) return callback( context );
4345
}
4446
if( callback ) return callback( preprocessed_context );

0 commit comments

Comments
 (0)