Package org.auraframework.throwable

Examples of org.auraframework.throwable.AuraRuntimeException


            return createDefinition(map);
        } catch (QuickFixException qfe) {
            return createDefinition(qfe);
        } catch (JsonParseException pe) {
            return createDefinition(new AuraRuntimeException(pe, getLocation()));
        } catch (IOException e) {
            return createDefinition(new AuraRuntimeException(e, getLocation()));
        }
    }
View Full Code Here


    }

    @Override
    public void addExpressionReferences(Set<PropertyReference> propRefs) {
        // TODO: this should be a typed exception
        throw new AuraRuntimeException("Expressions are not allowed inside a " + descriptor.getDefType()
                + " definition", propRefs.iterator().next().getLocation());
    }
View Full Code Here

            return ((Boolean) val).booleanValue();
        } else if (val instanceof Number) {
            // Number
            return new BigDecimal(val.toString());
        }
        throw new AuraRuntimeException("Unexpected type.");
    }
View Full Code Here

                    .themes(descriptor)
                    .extras(plugins)
                    .parse()
                    .content();
        } catch (QuickFixException e) {
            throw new AuraRuntimeException(e);
        }
    }
View Full Code Here

    };

    public FileSourceLoader(File base) {
        super();
        if (base == null || !base.exists() || !base.isDirectory()) {
            throw new AuraRuntimeException(String.format("Base directory %s does not exist", base == null ? "null"
                    : base.getAbsolutePath()));
        }
        try {
            this.base = base.getCanonicalFile();
        } catch (IOException ioe) {
            throw new AuraRuntimeException(String.format("IOException accessing base directory %s",
                    base.getAbsolutePath()), ioe);
        }
        this.baseLen = base.getPath().length();

        // add the namespace root to the file monitor
View Full Code Here

            // TODO: will have to find better impl to sanitize and validate library content
            // until then, at least strip out multi-line comments
            code = source.getContents();
            code = code.trim().replaceAll("(?s)/\\*.*?\\*/", "");
        } catch (IOException ioe) {
            return createDefinition(new AuraRuntimeException(ioe, getLocation()));
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                // We are in a very confusing state here, don't throw an exception. Either we've already had an
View Full Code Here

            Component tmpl = instanceService.getInstance(tmplDesc, attributes);
            Aura.getRenderingService().render(tmpl, out);
        } catch (QuickFixException x) {
            throw new AuraError(x);
        } catch (IOException x) {
            throw new AuraRuntimeException(x);
        } finally {
            try {
                out.close();
            } catch (IOException x) {
                throw new AuraRuntimeException(x);
            }
        }
    }
View Full Code Here

    public static Object buildValidatedClass(Class<?> clazz) {
        try {
            return clazz.newInstance();
        } catch (InstantiationException ie) {
            // This should never happen...
            throw new AuraRuntimeException(ie);
        } catch (IllegalAccessException iae) {
            throw new AuraRuntimeException(iae);
        }
    }
View Full Code Here

        if (code == null) {
            String source;
            try {
                source = Aura.getDefinitionService().getDefinition(getIncludeDescriptor()).getCode();
            } catch (QuickFixException qfe) {
                throw new AuraRuntimeException(qfe);
            }

            DefDescriptor<?> localBundle = includeDescriptor.getBundle();

            StringBuilder builder = new StringBuilder();
View Full Code Here

                context.popCallingDescriptor();
            }
        case EVENT:
            return (T) new EventImpl((DefDescriptor<EventDef>) descriptor, attributes);
        default:
            throw new AuraRuntimeException(String.format("Instances of %s cannot be created.", defType));
        }
    }
View Full Code Here

TOP

Related Classes of org.auraframework.throwable.AuraRuntimeException

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.