When you create an app scope, you might also develop custom modules in Java. From within your Java code, you can throw exceptions that can then be caught in your client app. For more information on custom modules, see Creating Custom Modules.
To create and throw an exception from your Java code running on the Akula Server, create an instance of the com.verivo.akula.api.core.exception.AKException class, or one of its subclasses, and then use the Java
throw statement to throw the exception object, as the following example shows:
The AKException class define two constructors: a default constructor and a constructor that takes a Java Throwable object.
After you throw an Akula exception on the server, you can catch the exception in a client app. For information on handling exceptions in a client app, see Handling Exceptions and Errors
For more examples of the constructor, see the API reference for the AKException class.