diff --git a/src/invidious/errors/errors.cr b/src/invidious/errors/errors.cr index e5c77fbc..98642bf7 100644 --- a/src/invidious/errors/errors.cr +++ b/src/invidious/errors/errors.cr @@ -1,11 +1,3 @@ -# 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 - macro error_template(*args) error_template_helper(env, locale, {{*args}}) end diff --git a/src/invidious/errors/special_exceptions.cr b/src/invidious/errors/special_exceptions.cr new file mode 100644 index 00000000..86ac679a --- /dev/null +++ b/src/invidious/errors/special_exceptions.cr @@ -0,0 +1,23 @@ +# +# This file contains special exceptions whose error page differ from the norm. +# + +# 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 + +# InitialInnerTubeParseExceptions are for used to display extra information on +# the error page for debugging/research purposes. +# +class InitialInnerTubeParseException < Exception + # temporally place holder + def self.new(parse_exception, **kwargs) + instance = InitialInnerTubeParseException.allocate + instance.initialize(error_message, parse_exception) + return instance + end +end