Issue #4645 - do not wrap exceptions from onError with RuntimeException
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
633298b5c7
commit
fcbe704b24
|
@ -377,25 +377,18 @@ public class ForwardedRequestCustomizer implements Customizer
|
|||
|
||||
// Do a single pass through the header fields as it is a more efficient single iteration.
|
||||
Forwarded forwarded = new Forwarded(request, config);
|
||||
try
|
||||
for (HttpField field : httpFields)
|
||||
{
|
||||
for (HttpField field : httpFields)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
MethodHandle handle = _handles.get(field.getName());
|
||||
if (handle != null)
|
||||
handle.invoke(forwarded, field);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
onError(field, t);
|
||||
}
|
||||
MethodHandle handle = _handles.get(field.getName());
|
||||
if (handle != null)
|
||||
handle.invoke(forwarded, field);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
onError(field, t);
|
||||
}
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
if (forwarded._proto != null)
|
||||
|
|
Loading…
Reference in New Issue