Package org.rythmengine.exception

Examples of org.rythmengine.exception.RythmException


    public void restart(RuntimeException cause) {
        if (isProdMode()) throw cause;
        if (!(cause instanceof ClassReloadException)) {
            String msg = cause.getMessage();
            if (cause instanceof RythmException) {
                RythmException re = (RythmException) cause;
                msg = re.getSimpleMessage();
            }
            logger.warn("restarting rythm engine due to %s", msg);
        }
        restart();
    }
View Full Code Here


                        msg = e.getMessage();
                        if (S.isEmpty(msg)) {
                            msg = "Rythm runtime exception caused by " + e.getClass().getName();
                        }
                    }
                    RythmException re = new RythmException(__engine, e, tc, se.getLineNumber(), -1, msg);
                    int lineNo = re.templateLineNumber;
                    String key = tc.getKey().toString();
                    int i = key.indexOf('\n');
                    if (i == -1) i = key.indexOf('\r');
                    if (i > -1) {
                        key = key.substring(0, i - 1) + "...";
                    }
                    if (key.length() > 80) key = key.substring(0, 80) + "...";
                    if (lineNo != -1) {
                        StackTraceElement[] newStack = new StackTraceElement[stackTrace.length + 1];
                        newStack[0] = new StackTraceElement(tc.name(), "", key, lineNo);
                        System.arraycopy(stackTrace, 0, newStack, 1, stackTrace.length);
                        re.setStackTrace(newStack);
                    }
                    throw re;
                }
            }
            throw (e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e));
View Full Code Here

TOP

Related Classes of org.rythmengine.exception.RythmException

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.