Throwing CustomExceptions from SI Methods

If I want to create a custom exception type and throw it in a service’s shared interface method, will the service that called the method properly be able to access the methods of this exception (ex: getMessage()), or will that violate the sandboxed application security rules since the Exception was created by another service?