Package

com.zengularity.benji

exception

Permalink

package exception

Visibility
  1. Public
  2. All

Type Members

  1. abstract class BenjiException extends IOException

    Permalink

    An error while using an object storage.

  2. case class BenjiUnknownError(message: String, throwable: Option[Throwable] = None) extends BenjiException with Product with Serializable

    Permalink

    An unknown error

  3. case class BucketAlreadyExistsException(bucketName: String) extends BenjiException with Product with Serializable

    Permalink

    An error when an operation is refused for an already existing bucket.

    An error when an operation is refused for an already existing bucket.

    import scala.concurrent.ExecutionContext
    
    import com.zengularity.benji.ObjectStorage
    import com.zengularity.benji.exception.BucketAlreadyExistsException
    
    def foo(
      storage: ObjectStorage,
      bucketName: String)(implicit ec: ExecutionContext) =
      storage.bucket(bucketName).create(failsIfExists = true).map { _ =>
        println(s"$bucketName created")
      }.recover {
        case BucketAlreadyExistsException(_) =>
          println(s"$bucketName already exists")
      }
  4. case class BucketNotEmptyException(bucketName: String) extends BenjiException with Product with Serializable

    Permalink

    An error when an operation cannot be applied on a not empty bucket (e.g.

    An error when an operation cannot be applied on a not empty bucket (e.g. delete).

  5. case class BucketNotFoundException(bucketName: String) extends EntityNotFoundException with Product with Serializable

    Permalink

    An error when a bucket is not found.

  6. abstract class EntityNotFoundException extends BenjiException

    Permalink

    An error when either a bucket or an object is not found.

  7. case class ObjectNotFoundException(bucketName: String, objectName: String) extends EntityNotFoundException with Product with Serializable

    Permalink

    An error when an object is not found.

  8. case class VersionNotFoundException(bucketName: String, objectName: String, versionId: String) extends EntityNotFoundException with Product with Serializable

    Permalink

    An error when an object version is not found.

Ungrouped