This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
packaging/src/exception.cr

33 lines
709 B
Crystal

class Package::Exception < Exception
getter recipe : Recipe
def initialize(@recipe, message : String)
super message
end
end
class Package::DownloadError < Package::Exception
getter url : URI
def initialize(recipe : Recipe, @url)
super recipe, "Downloading one of the sources failed."
end
end
class Package::ExtractionError < Package::Exception
getter url : URI
def initialize(recipe : Recipe, @url)
super recipe, "Extracting one of the sources failed."
end
end
class Package::BuildError < Package::Exception
end
class Package::PackagingError < Package::Exception
getter package : Package
def initialize(recipe : Recipe, @package)
super recipe, "Assembling a package failed."
end
end