modified classes for GeneralException thrown
This commit is contained in:
@ -22,7 +22,7 @@ class MongoStatement extends DbStatement
|
||||
$this->result->sort($sort);
|
||||
return $this;
|
||||
} else {
|
||||
throw new Exception('MongoStatement error. Impossible order results of opened cursor.');
|
||||
throw new GeneralException('MongoStatement error. Impossible order results of opened cursor.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class MongoStatement extends DbStatement
|
||||
$this->result->skip($skip);
|
||||
return $this;
|
||||
} else {
|
||||
throw new Exception('MongoStatement error. Impossible skip results of opened cursor.');
|
||||
throw new GeneralException('MongoStatement error. Impossible skip results of opened cursor.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ class MongoStatement extends DbStatement
|
||||
$this->result->limit($limit);
|
||||
return $this;
|
||||
} else {
|
||||
throw new Exception('MongoStatement error. Impossible limit results of opened cursor.');
|
||||
throw new GeneralException('MongoStatement error. Impossible limit results of opened cursor.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ class MongoStatement extends DbStatement
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Exception('Invalid fetch mode "' . $style . '" specified');
|
||||
throw new GeneralException('Invalid fetch mode "' . $style . '" specified');
|
||||
}
|
||||
return $row;
|
||||
}
|
||||
@ -132,7 +132,7 @@ class MongoStatement extends DbStatement
|
||||
$result = $request->execute();
|
||||
}
|
||||
if ($result === false) {
|
||||
throw new Exception('MongoDB request error.');
|
||||
throw new GeneralException('MongoDB request error.');
|
||||
}
|
||||
if ($result instanceof MongoCursor || is_array($result)) {
|
||||
$this->result = $result;
|
||||
@ -148,7 +148,7 @@ class MongoStatement extends DbStatement
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
throw new Exception('No connection to MongoDB server.');
|
||||
throw new GeneralException('No connection to MongoDB server.');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user