#[non_exhaustive]pub enum PhpError {
Boot(String),
Exception {
class: String,
message: String,
file: String,
line: u32,
},
Fatal {
message: String,
file: String,
line: u32,
},
Exit(i32),
NulByte,
ScriptNotFound(PathBuf),
NonUtf8Path(PathBuf),
Conversion(String),
}Expand description
Why PHP could not boot or run something.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Boot(String)
The engine could not start (or was already started in this process).
Exception
PHP code threw something that nothing caught.
Fatal
PHP hit a fatal error and abandoned the code it was running. The
engine is usable afterwards but degraded; see Php::poisoned.
Exit(i32)
The code called exit() or die() with this status.
NulByte
A label, code string or path contained a NUL byte.
ScriptNotFound(PathBuf)
The script passed to run_file does not exist.
NonUtf8Path(PathBuf)
The path is not valid UTF-8, so it cannot be handed to PHP as $argv.
Conversion(String)
A value could not be converted between PHP and Rust.
Trait Implementations§
Source§impl Error for PhpError
impl Error for PhpError
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 Forget for PhpError
impl Freeze for PhpError
impl Move for PhpError
impl RefUnwindSafe for PhpError
impl Send for PhpErrorwhere
RawVecInner: Send,
impl Sync for PhpErrorwhere
RawVecInner: Sync,
impl Unpin for PhpError
impl UnsafeUnpin for PhpError
impl UnwindSafe for PhpErrorwhere
RawVecInner: UnwindSafe,
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