Examples of AuraHandledException


Examples of org.auraframework.throwable.AuraHandledException

        if (file.exists()) {
            logger.info(String.format("Reading Performance metrics from file: %s", file.getAbsolutePath()));

            return new JsonReader().read(new FileReader(file));
        }
        throw new AuraHandledException(String.format("Performance metrics File: %s not found", file.getAbsolutePath()));
    }
View Full Code Here

Examples of org.auraframework.throwable.AuraHandledException

            throw new IllegalAccessException(cause);
        } else if (exceptionType.equals("java.lang.reflect.InvocationTargetException")) {
            if (cause.equals("java.lang.IllegalArgumentException")) {
                throw new InvocationTargetException(new IllegalArgumentException());
            } else if (cause.equals("aura.throwable.AuraHandledException")) {
                throw new InvocationTargetException(new AuraHandledException(""));
            }
        } else if (exceptionType.equals("aura.throwable.AuraHandledException")) {
            if (cause.equals("java.lang.IllegalArgumentException")) {
                throw new AuraHandledException(new IllegalArgumentException());
            } else {
                throw new AuraHandledException(cause);
            }
        } else {
            throw new RuntimeException();
        }
    }
View Full Code Here

Examples of org.auraframework.throwable.AuraHandledException

        throw gee;
    }

    @AuraEnabled
    public static void throwsException(@Key("errorMsg") String errorMsg) throws Exception {
        throw new AuraHandledException(errorMsg);
    }
View Full Code Here

Examples of org.auraframework.throwable.AuraHandledException

    return 42;
  }

  @AuraEnabled
  public static void alwaysThrows() throws AuraHandledException {
    throw new AuraHandledException("Foo");
  }
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.