Examples of ReaderException


Examples of org.jboss.resteasy.spi.ReaderException

      {
         return documentBuilder.newDocumentBuilder().parse(input);
      }
      catch (Exception e)
      {
         throw new ReaderException(e);
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

*/
public class ReaderExceptionMapperTest extends TestExceptionMapperBase {

    @Test
    public void handleExceptionWithoutResponse() {
        ReaderException nfe = new ReaderException("unacceptable");
        ReaderExceptionMapper nfem = injector.getInstance(ReaderExceptionMapper.class);
        Response r = nfem.toResponse(nfe);
        assertEquals(500, r.getStatus());
        verifyMessage(r, rtmsg("unacceptable"));
    }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

    @Test
    public void handleExceptionWithResponse() {
        Response mockr = mock(Response.class);
        when(mockr.getStatus()).thenReturn(400);
        ReaderException nfe = new ReaderException("unacceptable", mockr);
        ReaderExceptionMapper nfem = injector.getInstance(ReaderExceptionMapper.class);
        Response r = nfem.toResponse(nfe);
        assertEquals(400, r.getStatus());
        verifyMessage(r, rtmsg("unacceptable"));
    }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

      {
         body = new MimeBodyPart(new SequenceInputStream(is, entityStream));
      }
      catch (MessagingException e)
      {
         throw new ReaderException(e);
      }
      Providers providers = ResteasyProviderFactory.getContextData(Providers.class);
      input.setProviders(providers);
      input.setAnnotations(annotations);
      input.setBody(body);
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         input.setProviders(providers);
         return input;
      }
      catch (Exception e)
      {
         throw new ReaderException(e);
      }

   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         input.setProviders(providers);
         return input;
      }
      catch (MessagingException e)
      {
         throw new ReaderException(e);
      }

   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
      finally
      {
         ResteasyProviderFactory.popContextData(Providers.class);
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

      }
      catch (YAMLException ye)
      {
         logger.debug("Failed to decode Yaml: {0}", ye.getMessage());
         throw new ReaderException("Failed to decode Yaml", ye);
      }
      catch (Exception e)
      {
         logger.debug("Failed to decode Yaml: {0}", e.getMessage());
         throw new ReaderException("Failed to decode Yaml", e);
      }


   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.