瀏覽代碼

Might want to call those asserts before an abort()…

August Mueller 13 年之前
父節點
當前提交
4a2fe82d02
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/FMDatabase.m

+ 2 - 2
src/FMDatabase.m

@@ -249,8 +249,8 @@ - (void)warnInUse {
     
 #ifndef NS_BLOCK_ASSERTIONS
     if (_crashOnErrors) {
-        abort();
         NSAssert1(false, @"The FMDatabase %@ is currently in use.", self);
+        abort();
     }
 #endif
 }
@@ -263,8 +263,8 @@ - (BOOL)databaseExists {
         
     #ifndef NS_BLOCK_ASSERTIONS
         if (_crashOnErrors) {
-            abort();
             NSAssert1(false, @"The FMDatabase %@ is not open.", self);
+            abort();
         }
     #endif