浏览代码

Give a different output if Obj is not a vlaid class

git-svn-id: trunk@29045 -
pierre 10 年之前
父节点
当前提交
bde3bb4f5b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      rtl/objpas/sysutils/sysutils.inc

+ 3 - 1
rtl/objpas/sysutils/sysutils.inc

@@ -294,8 +294,10 @@ begin
   Writeln(hstdout^,'An unhandled exception occurred at $',HexStr(Addr),':');
   if Obj is exception then
     Writeln(hstdout^,Obj.ClassName,': ',Exception(Obj).Message)
+  else if Obj is TObject then
+    Writeln(hstdout^,'Exception object ',Obj.ClassName,' is not of class Exception.')
   else
-    Writeln(hstdout^,'Exception object ',Obj.ClassName,' is not of class Exception.');
+    Writeln(hstdout^,'Exception object is not ia valid class.');
   Writeln(hstdout^,BackTraceStrFunc(Addr));
   if (FrameCount>0) then
     begin