wayland: include object id in request errors
This commit is contained in:
parent
e18da23292
commit
0eb14d2816
3 changed files with 5 additions and 2 deletions
|
|
@ -830,6 +830,7 @@ fn write_request_handler<W: Write>(
|
||||||
writeln!(f, " }};")?;
|
writeln!(f, " }};")?;
|
||||||
writeln!(f, " Err({error}::MethodError {{")?;
|
writeln!(f, " Err({error}::MethodError {{")?;
|
||||||
writeln!(f, " interface: {camel_obj_name},")?;
|
writeln!(f, " interface: {camel_obj_name},")?;
|
||||||
|
writeln!(f, " id: self.id(),")?;
|
||||||
writeln!(f, " method,")?;
|
writeln!(f, " method,")?;
|
||||||
writeln!(f, " error,")?;
|
writeln!(f, " error,")?;
|
||||||
writeln!(f, " }})")?;
|
writeln!(f, " }})")?;
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,10 @@ pub enum ClientError {
|
||||||
ClientIdOutOfBounds,
|
ClientIdOutOfBounds,
|
||||||
#[error("Object {0} is not a display")]
|
#[error("Object {0} is not a display")]
|
||||||
NotADisplay(WlDisplayId),
|
NotADisplay(WlDisplayId),
|
||||||
#[error("Could not process a `{}.{}` request", .interface.name(), .method)]
|
#[error("Could not process a `{}#{}.{}` request", .interface.name(), .id, .method)]
|
||||||
MethodError {
|
MethodError {
|
||||||
interface: Interface,
|
interface: Interface,
|
||||||
|
id: ObjectId,
|
||||||
method: &'static str,
|
method: &'static str,
|
||||||
#[source]
|
#[source]
|
||||||
error: Box<dyn Error + 'static>,
|
error: Box<dyn Error + 'static>,
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,10 @@ pub enum UsrConError {
|
||||||
Write(#[source] BufFdError),
|
Write(#[source] BufFdError),
|
||||||
#[error("Server sent an event for object {0} that does not exist")]
|
#[error("Server sent an event for object {0} that does not exist")]
|
||||||
MissingObject(ObjectId),
|
MissingObject(ObjectId),
|
||||||
#[error("Could not process a `{}.{}` event", .interface.name(), .method)]
|
#[error("Could not process a `{}#{}.{}` event", .interface.name(), .id, .method)]
|
||||||
MethodError {
|
MethodError {
|
||||||
interface: Interface,
|
interface: Interface,
|
||||||
|
id: ObjectId,
|
||||||
method: &'static str,
|
method: &'static str,
|
||||||
#[source]
|
#[source]
|
||||||
error: Box<dyn Error + 'static>,
|
error: Box<dyn Error + 'static>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue