2022-07-19 21:05:49 +02:00
|
|
|
# InfoExceptions are for displaying information to the user.
|
|
|
|
#
|
|
|
|
# An InfoException might or might not indicate that something went wrong.
|
|
|
|
# Historically Invidious didn't differentiate between these two options, so to
|
|
|
|
# maintain previous functionality InfoExceptions do not print backtraces.
|
|
|
|
class InfoException < Exception
|
|
|
|
end
|
|
|
|
|
2022-03-27 01:20:00 +01:00
|
|
|
# Exception used to hold the bogus UCID during a channel search.
|
|
|
|
class ChannelSearchException < InfoException
|
|
|
|
getter channel : String
|
|
|
|
|
|
|
|
def initialize(@channel)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-02-03 00:02:24 +01:00
|
|
|
# Exception used to hold the name of the missing item
|
|
|
|
# Should be used in all parsing functions
|
2022-02-09 01:36:17 +01:00
|
|
|
class BrokenTubeException < Exception
|
2022-02-03 00:02:24 +01:00
|
|
|
getter element : String
|
|
|
|
|
|
|
|
def initialize(@element)
|
|
|
|
end
|
2022-02-09 01:36:17 +01:00
|
|
|
|
|
|
|
def message
|
|
|
|
return "Missing JSON element \"#{@element}\""
|
|
|
|
end
|
2022-02-03 00:02:24 +01:00
|
|
|
end
|
2022-05-27 13:36:13 +00:00
|
|
|
|
2022-07-06 19:59:05 +00:00
|
|
|
# Exception threw when an element is not found.
|
2022-05-27 13:36:13 +00:00
|
|
|
class NotFoundException < InfoException
|
|
|
|
end
|
2022-08-23 09:50:57 +00:00
|
|
|
|
|
|
|
class VideoNotAvailableException < Exception
|
|
|
|
end
|