Search in sources :

Example 1 with FDLanguageException

use of com.intergral.fusiondebug.server.FDLanguageException in project Lucee by lucee.

the class FDVariableComparator method getVariables.

private static List getVariables(FDStackFrameImpl frame, PageContextImpl pc, List list, String strScope) throws FDLanguageException {
    Scope scope;
    try {
        scope = pc.scope(strScope, null);
        if (scope != null)
            return copyValues(frame, list, scope);
        Object value = pc.undefinedScope().get(strScope, null);
        if (value != null) {
            if (value instanceof Struct)
                return copyValues(frame, new ArrayList(), (Struct) value);
            throw new FDLanguageException("[" + strScope + "] is not of type scope, type is [" + Caster.toTypeName(value) + "]");
        }
        throw new FDLanguageException("[" + strScope + "] does not exist in the current context");
    } catch (PageException e) {
        throw new FDLanguageException(e);
    }
}
Also used : PageException(lucee.runtime.exp.PageException) Scope(lucee.runtime.type.scope.Scope) FDLanguageException(com.intergral.fusiondebug.server.FDLanguageException) ArrayList(java.util.ArrayList) Struct(lucee.runtime.type.Struct)

Example 2 with FDLanguageException

use of com.intergral.fusiondebug.server.FDLanguageException in project Lucee by lucee.

the class FDVariableComparator method getVariables.

@Override
public List getVariables() {
    Iterator it = getScopeNames().iterator();
    List list = new ArrayList();
    while (it.hasNext()) {
        try {
            getVariables(this, pc, list, (String) it.next());
        } catch (FDLanguageException e) {
            SystemOut.printDate(e);
        }
    }
    return sort(list);
}
Also used : FDLanguageException(com.intergral.fusiondebug.server.FDLanguageException) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

FDLanguageException (com.intergral.fusiondebug.server.FDLanguageException)2 ArrayList (java.util.ArrayList)2 Iterator (java.util.Iterator)1 List (java.util.List)1 PageException (lucee.runtime.exp.PageException)1 Struct (lucee.runtime.type.Struct)1 Scope (lucee.runtime.type.scope.Scope)1