fix arguments of RequestHandler.Listener#handleError
This commit is contained in:
parent
5b28627f32
commit
487d1660e2
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ import tudbut.parsing.TCN;
|
||||||
public class RequestHandler {
|
public class RequestHandler {
|
||||||
|
|
||||||
public interface Listener {
|
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;
|
private Listener catcher;
|
||||||
|
@ -101,7 +101,7 @@ public class RequestHandler {
|
||||||
if(resp != null)
|
if(resp != null)
|
||||||
res.call(resp);
|
res.call(resp);
|
||||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
|
||||||
catcher.handleError(e, res, rej);
|
catcher.handleError(request, e, res, rej);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class Main implements IRequestCatcher, RequestHandler.Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
rej.call(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue