blob: d509ef6ac700ec264b52de2f701b337fb1148c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//! ref: composer/src/Composer/DependencyResolver/SolverBugException.php
use shirabe_php_shim::RuntimeException;
#[derive(Debug)]
pub struct SolverBugException(pub RuntimeException);
impl SolverBugException {
pub fn new(message: String) -> Self {
let full_message = format!(
"{}\nThis exception was most likely caused by a bug in Composer.\n\
Please report the command you ran, the exact error you received, and your composer.json on https://github.com/composer/composer/issues - thank you!\n",
message
);
SolverBugException(RuntimeException {
message: full_message,
code: 0,
})
}
}
impl std::fmt::Display for SolverBugException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}
impl std::error::Error for SolverBugException {}
|