     func run()->Array<DBModel>{
         
         var results:Array<DBModel> = Array<DBModel>()
-        for row in try! DBModel.db.prepare(query!) {
-            
-            let model = type(of: self).init()
-            
-            model.buildFromRow(row: row)
-            
-            
-            results.append(model)
+
+        
+        do{
+            for row in try DBModel.db.prepare(query!) {
+                let model = type(of: self).init()
+                model.buildFromRow(row: row)
+                results.append(model)
+            }
+            
+            LogInfo("Execute Query run() function from \(type(of: self).nameOfTable)  success")
+        }catch{
+            LogError("Execute run() of \(type(of: self).nameOfTable) failure。\(error)")
         }
         
         query = nil
-        
-        LogInfo("Execute Query run() function from \(type(of: self).nameOfTable)  success")
         
         return results
         

        
        let query = Table(type(of: self).nameOfTable).where(predicate).order(Expression<NSNumber>("created_at").desc)
        
        for result in try! DBModel.db.prepare(query) {
            
            let model = T()
            model.buildFromRow(row: result)
            
            results.append(model)
        }
        
        return results

        
        let query = Table(type(of: self).nameOfTable).where(predicate).order(Expression<NSNumber>("created_at").desc)
        

        
        do{
            for result in try DBModel.db.prepare(query) {
                
                let model = T()
                model.buildFromRow(row: result)
                
                results.append(model)
            }
        }catch{
            LogError("Find all from \(type(of: self).nameOfTable) failure。\(error)")
        }
        
        return results
