mirror of
https://github.com/corda/corda.git
synced 2025-06-21 08:40:03 +00:00
Custom exceptions in corda, should either derive from an appropriate closely related java exception, or CordaException, or CordaRuntimeException. They should not inherit just from Exception, or RuntimeException.
Handle PR comments Add nicer constructors to CordaException and CordaRuntimeException (cherry picked from commit89478c8
) Fix ambiguous defaulted constructor (cherry picked from commitec9bafe
) Address PR comment Update a few more custom exceptions
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
package net.corda.client.rpc
|
||||
|
||||
import net.corda.core.CordaRuntimeException
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
|
||||
/**
|
||||
* Thrown to indicate that the calling user does not have permission for something they have requested (for example
|
||||
* calling a method).
|
||||
*/
|
||||
@CordaSerializable
|
||||
class PermissionException(msg: String) : RuntimeException(msg)
|
||||
class PermissionException(msg: String) : CordaRuntimeException(msg)
|
||||
|
Reference in New Issue
Block a user