summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 57da4d114..83571345c 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -13,6 +13,7 @@ if os.name != "nt":
from grp import getgrnam
from itertools import islice
+from traceback import print_exc
from module.utils import save_join, save_path, fs_encode, fs_decode
@@ -284,6 +285,11 @@ class Plugin(Base):
""" fail and give reason """
raise Fail(reason)
+ def error(self, reason=None, type="parse"):
+ raise Fail("%s error%s | Plugin out of date" % (type.capitalize(), ':' + str(reason) if reason else ""))
+ if self.core.debug:
+ print_exc()
+
def offline(self):
""" fail and indicate file is offline """
raise Fail("offline")