panic on errors in hot-reload if no error handler socket is connected
This commit is contained in:
1 parent
5c767ececd
commit
f0655a11ad
6 files changed
+84
-52
No files matched your search
@@ -1,3 +1,5 @@
|
||||
use std::fmt::Display;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::CodeLocation;
|
||||
@@ -37,3 +39,18 @@ impl ParseError {
|
||||
ParseError { message, location }
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Error::ParseError(error) => write!(
|
||||
f,
|
||||
"parse error:\n--> at {}:{}:{}\n\t{:?}\n",
|
||||
error.location.file_path, error.location.line, error.location.column, error.message
|
||||
),
|
||||
Error::RecompileRequiredError(reason) => {
|
||||
write!(f, "recompile required: {:?}\n", reason)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user