Permalink
Browse files

Better api failure logging (now uses Error:stack)

  • Loading branch information...
tylermwashburn
tylermwashburn committed Oct 11, 2012
1 parent 55cbd50 commit 0124695fcc3cc2236a6003d800f3e37a5ae311f4
Showing with 4 additions and 2 deletions.
  1. +4 −2 trailer.js
View
@@ -456,19 +456,19 @@ tl.GET.preprocessors.push(
return i.conf.api[ i.up ]( i, o, i.extra )
} catch ( error ) {
o.error( 500 )
- tl.error( i.up, i.up + " failed for " + i.url.pathname )
return true
}
} else if ( i.conf.api[ i.extra ] ) {
try {
return i.conf.api[ i.extra ]( i, o, i.up )
} catch ( error ) {
o.error( 500 )
- tl.error( i.extra, i.extra + " failed for " + i.url.pathname )
return true
}
}
if ( i.conf.api ) {
+ tl.error( i.up, i.up + " failed for " + i.url.pathname + "\n\""
+ + error.stack + "\"" )
}
},
@@ -498,6 +498,8 @@ tl.GET.preprocessors.push(
}
}
}
+ tl.error( i.extra, i.extra + " failed for " + i.url.pathname + "\n\""
+ + error.stack + "\"" )
}
}
},

0 comments on commit 0124695

Please sign in to comment.