pub enum BlueprintError {
Show 27 variants
ParseError {
location: SourceLocation,
message: String,
},
TypeError {
expected: String,
actual: String,
},
NameError {
name: String,
},
ImportError {
message: String,
},
AttributeError {
type_name: String,
attr: String,
},
IndexError {
message: String,
},
KeyError {
key: String,
},
ValueError {
message: String,
},
ArgumentError {
message: String,
},
DivisionByZero,
IoError {
path: String,
message: String,
},
HttpError {
url: String,
message: String,
},
ProcessError {
command: String,
message: String,
},
JsonError {
message: String,
},
GlobError {
message: String,
},
AssertionError {
message: String,
},
UserError {
message: String,
},
NotCallable {
type_name: String,
},
InternalError {
message: String,
},
Unsupported {
message: String,
},
PermissionDenied {
operation: String,
resource: String,
hint: String,
},
Break,
Continue,
Return {
value: Arc<Value>,
},
Exit {
code: i32,
},
Silent,
WithStack {
error: Box<BlueprintError>,
stack: StackTrace,
location: Option<SourceLocation>,
},
}Variants§
ParseError
TypeError
NameError
ImportError
AttributeError
IndexError
KeyError
ValueError
ArgumentError
DivisionByZero
IoError
HttpError
ProcessError
JsonError
GlobError
AssertionError
UserError
NotCallable
InternalError
Unsupported
PermissionDenied
Break
Continue
Return
Exit
Silent
WithStack
Implementations§
Source§impl BlueprintError
impl BlueprintError
pub fn with_file(self, file: String) -> Self
pub fn is_control_flow(&self) -> bool
pub fn with_stack_frame(self, frame: StackFrame) -> Self
pub fn with_location(self, loc: SourceLocation) -> Self
pub fn stack_trace(&self) -> Option<&StackTrace>
pub fn error_location(&self) -> Option<&SourceLocation>
pub fn inner_error(&self) -> &BlueprintError
pub fn format_with_stack(&self) -> String
Trait Implementations§
Source§impl Clone for BlueprintError
impl Clone for BlueprintError
Source§fn clone(&self) -> BlueprintError
fn clone(&self) -> BlueprintError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlueprintError
impl Debug for BlueprintError
Source§impl Display for BlueprintError
impl Display for BlueprintError
Source§impl Error for BlueprintError
impl Error for BlueprintError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for BlueprintError
impl !RefUnwindSafe for BlueprintError
impl Send for BlueprintError
impl Sync for BlueprintError
impl Unpin for BlueprintError
impl !UnwindSafe for BlueprintError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more