Package org.auraframework.throwable

Examples of org.auraframework.throwable.AuraRuntimeException


                intf ? InterfaceDef.class : ComponentDef.class);
        Source<?> source = Aura.getContextService().getCurrentContext().getDefRegistry().getSource(desc);

        // checks for an empty attribute name or type
        if ("".equals(attName) || "".equals(type)) {
            throw new AuraRuntimeException("Cannot leave the field blank");
        }
        // Validates the attribute name
        if ((AuraTextUtil.validateAttributeName(attName)) != true) {
            throw new AuraRuntimeException("Invalid attribute name:'" + attName
                    + "',Refer to Auradocs for valid attribute names");
        }
        // validates the type
        try {
            DefDescriptor<TypeDef> typeDesc = Aura.getDefinitionService().getDefDescriptor(type, TypeDef.class);
            typeDesc.getDef();
        } catch (AuraRuntimeException e) {
            throw new AuraRuntimeException("Invalid attribute type:" + type);
        }

        if (!source.exists()) {
            throw new AuraError("Cannot find source for " + desc.getQualifiedName());
        }
View Full Code Here


                ret = ((Answer<?>)ret).answer();
            } catch (Throwable e) {
                if (e instanceof QuickFixException) {
                    throw (QuickFixException)e;
                } else {
                    throw new AuraRuntimeException(e);
                }
            }
        }
        return ret;
    }
View Full Code Here

                    value = ((Answer<?>)value).answer();
                } catch (Throwable e) {
                    if (e instanceof IOException) {
                        throw (IOException)e;
                    } else {
                        throw new AuraRuntimeException(e);
                    }
                }
            }
            json.writeMapEntry(entry.getKey(), value);
        }
View Full Code Here

                    int i;

                    try {
                        i = Integer.parseInt(part); // NumberFormatException will be caught below
                    } catch (NumberFormatException nfe) {
                        throw new AuraRuntimeException(nfe);
                    }
                    ret = ((List<?>) root).get(i);
                }
            } else {
                Method meth = null;
View Full Code Here

    private static AuraRuntimeException makeException(String message, Throwable cause, ModelDef def) {
        if (def != null) {
            return new AuraExecutionException(message,def.getLocation(),cause);
        } else {
            return new AuraRuntimeException(message, cause);
        }
    }
View Full Code Here

                return instances.remove(0).answer();
            } else {
                return instances.get(0).answer();
            }
        } catch (Throwable e) {
            throw new AuraRuntimeException(e);
        }
    }
View Full Code Here

        ExecutorService executor = Executors.newFixedThreadPool(TestExecutor.NUM_THREADS);
        try {
            executeIterations(executor, queue, "parallelizable");
            executeIterations(executor, hostileQueue, "thread hostile");
        } catch (InterruptedException e) {
            throw new AuraRuntimeException("TEST RUN INTERRUPTED", e);
        } finally {
            executor.shutdown();
            WebDriverProvider provider = AuraUtil.get(WebDriverProvider.class);
            if (provider != null) {
                logger.info("Releasing WebDriver resources");
View Full Code Here

    @AuraEnabled
    public static String serializeComponentRegistryToJson() throws AuraException {
        try {
            return RegistryJsonSerializer.serializeToFile();
        } catch (IOException e) {
            throw new AuraRuntimeException(e.getMessage());
        }
    }
View Full Code Here

    public Definition getDefinition(String qualifiedName, DefType... defTypes) throws QuickFixException {
        ContextService contextService = Aura.getContextService();
        contextService.assertEstablished();

        if (defTypes == null || defTypes.length == 0) {
            throw new AuraRuntimeException("defType is required");
        }

        DefDescriptor<?> desc = null;
        for (DefType defType : defTypes) {
            desc = getDefDescriptor(qualifiedName, defType.getPrimaryInterface());
View Full Code Here

        try {
            ret = (FormatAdapter<T>) formatAdapterCache.get(new IndexKey(format, type));
        } catch (ExecutionException ee) {
            // FIXME: EXCEPTIONINFO
            throw new AuraRuntimeException(ee);
        }

        return ret;
    }
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.