Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.peterphi.std.guice.restclient.resteasy.impl;
 
	{
		this. = exceptionFactory;
	}
	public void handle(ClientResponse<?> responsethrows RuntimeException
	{
		{
			try
			{
				final BaseClientResponse<?> r = (BaseClientResponse<?>) response;
				final InputStream stream = r.getStreamFactory().getInputStream();
				stream.reset();
				final RestFailure failure = response.getEntity(RestFailure.class);
				// Reset the stack trace so we don't confuse matters with the frames from the factory
				final RestException exception = .build(failureresponse);
				exception.fillInStackTrace();
				throw exception;
			}
			catch (IOException e)
			{
				throw new ClientResponseFailure(new RuntimeException("Error mapping response to exception: " + responsee),
				                                response);
			}
		}
	}
New to GrepCode? Check out our FAQ X