create serde compatible parse error
This commit is contained in:
1 parent
41e905144c
commit
df4ea20bb8
9 files changed
+68
-45
No files matched your search
@@ -81,17 +81,11 @@ impl DesktopController {
|
||||
impl ErrorHandler for DesktopErrorHandler {
|
||||
fn handle_error(&self, err: Error) {
|
||||
if let Some(conn) = &mut *self.latest_connection.lock().unwrap() {
|
||||
match err {
|
||||
Error::RecompileRequiredError(reason) => {
|
||||
conn.get_mut()
|
||||
.write_all(
|
||||
(serde_json::to_string(&reason).unwrap() + "\n")
|
||||
.as_bytes(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
Error::ParseError(err) => log::warn!("{}", err),
|
||||
}
|
||||
conn.get_mut()
|
||||
.write_all(
|
||||
(serde_json::to_string(&err).unwrap() + "\n").as_bytes(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user