33 lines
709 B
Crystal
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
|
||
|
|