Class AsException

  • All Implemented Interfaces:
    Serializable

    public class AsException
    extends RuntimeException
    This exception is thrown by an as(...) method that is expected to retrieve a role for a given datum, when the role is not found.
    Version:
    $Id$
    Author:
    Fabrizio Giudici
    See Also:
    Serialized Form
    Status: stable API
    • Constructor Detail

      • AsException

        public AsException​(@Nonnull
                           Class<?> roleType)
        Creates an exception.
        Parameters:
        roleType - the type of the role that was searched and not found
      • AsException

        public AsException​(@Nonnull
                           Class<?> clazz,
                           @Nonnull
                           Throwable cause)
        Creates an exception with a cause.
        Parameters:
        roleType - the type of the role that was searched and not found
        cause - the cause for not having found the role