mirror of
https://github.com/isar/rusqlite.git
synced 2025-12-08 12:32:24 +08:00
Change Error from a struct to an enum (BREAKING CHANGE).
This allows us to separate out the underlying SQLite error codes from errors that occur on the Rust side.
This commit is contained in:
@@ -133,10 +133,7 @@ impl<'conn> Statement<'conn> {
|
||||
if let Some(i) = try!(self.parameter_index(name)) {
|
||||
try!(self.conn.decode_result(unsafe { value.bind_parameter(self.stmt, i) }));
|
||||
} else {
|
||||
return Err(Error {
|
||||
code: ffi::SQLITE_MISUSE,
|
||||
message: format!("Invalid parameter name: {}", name),
|
||||
});
|
||||
return Err(Error::InvalidParameterName(name.into()));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user