Permalink
Browse files

warning on no stack trace

  • Loading branch information...
1 parent 9242e04 commit bbd0566c5b7ea38e40a2191dfdcce2925bab001b @cloudshift committed Mar 13, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 cloudshift/core/LogImpl.hx
@@ -76,7 +76,10 @@ class LogImpl {
inline static function
doTrace(type:String,category:String,msg:Dynamic,?inf:haxe.PosInfos) {
if (type == "error") {
- msg = msg + "\n"+haxe.Stack.toString(haxe.Stack.exceptionStack());
+ var stack = haxe.Stack.toString(haxe.Stack.exceptionStack());
+ if (stack.length == 0)
+ stack = "No haXe stack trace available";
+ msg = msg + "\n"+stack;
}
write(format(type,msg,category,inf),type);
}

0 comments on commit bbd0566

Please sign in to comment.