Package org.exoplatform.services.rest.impl

Examples of org.exoplatform.services.rest.impl.InternalException


                     }
                     if (e instanceof WebApplicationException)
                     {
                        throw (WebApplicationException)e;
                     }
                     throw new InternalException(e);
                  }
               }
            }
         }
View Full Code Here


      {
         Throwable cause = pae.getCause();
         if (cause instanceof IllegalArgumentException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof IllegalAccessException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof InvocationTargetException)
         {
            if (LOG.isDebugEnabled())
            {
               LOG.debug(cause.getLocalizedMessage(), cause);
            }
            // get cause of exception that method produces
            Throwable throwable = cause.getCause();
            // if WebApplicationException than it may contain response
            if (WebApplicationException.class == throwable.getClass())
            {
               throw (WebApplicationException)throwable;
            }

            throw new InternalException(throwable);
         }
         else if (cause instanceof RuntimeException)
         {
            throw (RuntimeException)cause;
         }
View Full Code Here

                     }
                     if (e instanceof WebApplicationException)
                     {
                        throw (WebApplicationException)e;
                     }
                     throw new InternalException(e);
                  }
               }
            }
         }
View Full Code Here

      {
         Throwable cause = pae.getCause();
         if (cause instanceof IllegalArgumentException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof IllegalAccessException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof InvocationTargetException)
         {
            if (LOG.isDebugEnabled())
            {
               cause.printStackTrace();
            }
            // get cause of exception that method produces
            Throwable throwable = cause.getCause();
            // if WebApplicationException than it may contain response
            if (WebApplicationException.class == throwable.getClass())
            {
               throw (WebApplicationException)throwable;
            }

            throw new InternalException(throwable);
         }
         else if (cause instanceof RuntimeException)
         {
            throw (RuntimeException)cause;
         }
View Full Code Here

               {

                  if (LOG.isDebugEnabled())
                     e.printStackTrace();

                  throw new InternalException(e);

               }
            }
         }

      }
      try
      {
         return methodResource.getMethod().invoke(resource, p);
      }
      catch (IllegalArgumentException argExc)
      {
         // should not be thrown
         throw new InternalException(argExc);
      }
      catch (IllegalAccessException accessExc)
      {
         // should not be thrown
         throw new InternalException(accessExc);
      }
      catch (InvocationTargetException invExc)
      {
         if (LOG.isDebugEnabled())
            invExc.printStackTrace();
         // get cause of exception that method produces
         Throwable cause = invExc.getCause();
         // if WebApplicationException than it may contain response
         if (WebApplicationException.class == cause.getClass())
            throw (WebApplicationException)cause;

         throw new InternalException(cause);
      }
   }
View Full Code Here

                  if (LOG.isDebugEnabled())
                  {
                     e.printStackTrace();
                  }

                  throw new InternalException(e);

               }
            }
         }
View Full Code Here

         return methodResource.getMethod().invoke(resource, p);
      }
      catch (IllegalArgumentException argExc)
      {
         // should not be thrown
         throw new InternalException(argExc);
      }
      catch (IllegalAccessException accessExc)
      {
         // should not be thrown
         throw new InternalException(accessExc);
      }
      catch (InvocationTargetException invExc)
      {
         if (LOG.isDebugEnabled())
         {
            invExc.printStackTrace();
         }
         // get cause of exception that method produces
         Throwable cause = invExc.getCause();
         // if WebApplicationException than it may contain response
         if (WebApplicationException.class == cause.getClass())
         {
            throw (WebApplicationException)cause;
         }

         throw new InternalException(cause);
      }
   }
View Full Code Here

                     if (LOG.isDebugEnabled())
                     {
                        LOG.debug(e.getLocalizedMessage(), e);
                     }

                     throw new InternalException(e);
                  }
               }
            }
         }
View Full Code Here

      {
         Throwable cause = pae.getCause();
         if (cause instanceof IllegalArgumentException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof IllegalAccessException)
         {
            // should not be thrown
            throw new InternalException(cause);
         }
         else if (cause instanceof InvocationTargetException)
         {
            if (LOG.isDebugEnabled())
            {
               LOG.debug(cause.getLocalizedMessage(), cause);
            }
            // get cause of exception that method produces
            Throwable throwable = cause.getCause();
            // if WebApplicationException than it may contain response
            if (WebApplicationException.class == throwable.getClass())
            {
               throw (WebApplicationException)throwable;
            }

            throw new InternalException(throwable);
         }
         else if (cause instanceof RuntimeException)
         {
            throw (RuntimeException)cause;
         }
View Full Code Here

               {

                  if (LOG.isDebugEnabled())
                     e.printStackTrace();

                  throw new InternalException(e);

               }
            }
         }

      }
      try
      {
         return methodResource.getMethod().invoke(resource, p);
      }
      catch (IllegalArgumentException argExc)
      {
         // should not be thrown
         throw new InternalException(argExc);
      }
      catch (IllegalAccessException accessExc)
      {
         // should not be thrown
         throw new InternalException(accessExc);
      }
      catch (InvocationTargetException invExc)
      {
         if (LOG.isDebugEnabled())
            invExc.printStackTrace();
         // get cause of exception that method produces
         Throwable cause = invExc.getCause();
         // if WebApplicationException than it may contain response
         if (WebApplicationException.class == cause.getClass())
            throw (WebApplicationException)cause;

         throw new InternalException(cause);
      }
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.rest.impl.InternalException

Copyright © 2018 www.massapicom. 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.