fix arguments of RequestHandler.Listener#handleError

This commit is contained in:
Daniella / Tove 2022-07-06 16:02:59 +02:00
parent 5b28627f32
commit 487d1660e2
2 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ import tudbut.parsing.TCN;
public class RequestHandler {
public interface Listener {
void handleError(Throwable error, Callback<Response> res, Callback<Throwable> rej);
void handleError(Request request, Throwable error, Callback<Response> res, Callback<Throwable> rej);
}
private Listener catcher;
@ -101,7 +101,7 @@ public class RequestHandler {
if(resp != null)
res.call(resp);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
catcher.handleError(e, res, rej);
catcher.handleError(request, e, res, rej);
}
}
}

View file

@ -80,7 +80,7 @@ public class Main implements IRequestCatcher, RequestHandler.Listener {
}
@Override
public void handleError(Throwable error, Callback<Response> res, Callback<Throwable> rej) {
public void handleError(Request request, Throwable error, Callback<Response> res, Callback<Throwable> rej) {
rej.call(error);
}