All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.edla.tmdb.client.Exceptions.scala Maven / Gradle / Ivy

The newest version!
package org.edla.tmdb.client

// scalastyle:off null
//http://stackoverflow.com/questions/10925268/define-your-own-exceptions-with-overloaded-constructors-in-scala
class TmdbException(message: String = null, cause: Throwable = null, val code: Int)
    extends RuntimeException(message, cause)

class InvalidApiKeyException(message: String = null, cause: Throwable = null, code: Int)
    extends TmdbException(message, cause, code)

object TmdbException {
  def apply(message: String = null, cause: Throwable = null, code: Int = -1): TmdbException =
    new TmdbException(message, cause, code)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy