Examples of ViewException


Examples of ca.simplegames.micro.viewers.ViewException

            }

            if (e.getCause() != null && e.getCause() instanceof ControllerException) {
                throw new ControllerException(e.getMessage());
            }
            throw new ViewException(e.getMessage());
        }
    }
View Full Code Here

Examples of ca.simplegames.micro.viewers.ViewException

                throw new FileNotFoundException(String.format("%s not found.", path));
            } catch (Exception e) {
                if (e instanceof RedirectException || e.getCause() instanceof RedirectException) {
                    throw new RedirectException();
                } else {
                    throw new ViewException(e.getMessage()); // generic??
                }
            }
        }
        return 0;    }
View Full Code Here

Examples of ca.simplegames.micro.viewers.ViewException

                        repository.getSite().getControllerManager().execute(
                                filterDef.getKey(), context, (Map) filterDef.getValue());
                    } catch (Exception e) {
                        log.error(String.format("Error while evaluating the BEFORE filter: `%s`", filterDef.getKey()));
                        e.printStackTrace();
                        throw new ViewException(e.getMessage());
                    }
                }
            }

View Full Code Here

Examples of ca.simplegames.micro.viewers.ViewException

            template.process(context, out);

            return IO.copy(new StringReader(writer.toString()), out);

        } catch (TemplateException e) {
            throw new ViewException(e.getMessage());
        } catch (IOException e) {
            throw new FileNotFoundException(String.format("%s not found.", path));
        } catch (Exception e) {
            if (e instanceof RedirectException || e.getCause() instanceof RedirectException) {
                throw new RedirectException();
            }else{
                throw new ViewException(e.getMessage()); // generic??
            }
        }
    }
View Full Code Here

Examples of douyu.mvc.ViewException

        } catch (Exception e) {
        }
      }
    }

    throw new ViewException("No ViewManager for 'ViewManager.out()', controller='" + controllerClassName + "', attion='"
        + actionName + "'.");
  }
View Full Code Here

Examples of douyu.mvc.ViewException

  }

  private void outView(ViewManagerProvider vmp, String viewFileName) {
    ViewManager vm = vmp.getViewManager(this);
    if (vm == null)
      throw new ViewException("No ViewManager for view file: " + viewFileName);

    for (Map.Entry<String, Object> e : viewArgs.entrySet()) {
      vm.put(e.getKey(), e.getValue());
    }
View Full Code Here

Examples of douyu.mvc.ViewException

    } else {
      vmp = config.getViewManagerProvider(extension);
    }

    if (vmp == null) {
      throw new ViewException("No ViewManagerProvider for view file: " + viewFileName);
    }

    outView(vmp, viewFileName);
  }
View Full Code Here

Examples of douyu.mvc.ViewException

    if (defaultViewManagerProvider == null && defaultViewManagerProviderClassName != null) {
      try {
        this.defaultViewManagerProvider = (ViewManagerProvider) loader.loadClass(defaultViewManagerProviderClassName)
            .newInstance();
      } catch (Exception e) {
        throw new ViewException("failed to getDefaultViewManagerProvider: " + e);
      }
    }
    return defaultViewManagerProvider;
  }
View Full Code Here

Examples of douyu.mvc.ViewException

    if (vmp == null) {
      try {
        vmp = (ViewManagerProvider) loader.loadClass(className).newInstance();
        viewManagerProviders.put(className, vmp);
      } catch (Exception e) {
        throw new ViewException("failed to getViewManagerProvider for extension: " + extension, e);
      }
    }
    return vmp;
  }
View Full Code Here

Examples of douyu.mvc.ViewException

  public void out(String viewFileName) {
    try {
      douyuContext.getHttpServletRequest().getRequestDispatcher(viewFileName).include(douyuContext.getHttpServletRequest(),
          douyuContext.getHttpServletResponse());
    } catch (Throwable t) {
      throw new ViewException(t);
    }
  }
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.