1
0
Fork 0
forked from wry/wry

wayland: include object id in request errors

This commit is contained in:
Julian Orth 2024-09-17 20:24:19 +02:00
parent e18da23292
commit 0eb14d2816
3 changed files with 5 additions and 2 deletions

View file

@ -830,6 +830,7 @@ fn write_request_handler<W: Write>(
writeln!(f, " }};")?;
writeln!(f, " Err({error}::MethodError {{")?;
writeln!(f, " interface: {camel_obj_name},")?;
writeln!(f, " id: self.id(),")?;
writeln!(f, " method,")?;
writeln!(f, " error,")?;
writeln!(f, " }})")?;

View file

@ -37,9 +37,10 @@ pub enum ClientError {
ClientIdOutOfBounds,
#[error("Object {0} is not a display")]
NotADisplay(WlDisplayId),
#[error("Could not process a `{}.{}` request", .interface.name(), .method)]
#[error("Could not process a `{}#{}.{}` request", .interface.name(), .id, .method)]
MethodError {
interface: Interface,
id: ObjectId,
method: &'static str,
#[source]
error: Box<dyn Error + 'static>,

View file

@ -63,9 +63,10 @@ pub enum UsrConError {
Write(#[source] BufFdError),
#[error("Server sent an event for object {0} that does not exist")]
MissingObject(ObjectId),
#[error("Could not process a `{}.{}` event", .interface.name(), .method)]
#[error("Could not process a `{}#{}.{}` event", .interface.name(), .id, .method)]
MethodError {
interface: Interface,
id: ObjectId,
method: &'static str,
#[source]
error: Box<dyn Error + 'static>,