# -*- coding: utf-8 -*-
#
-# Copyright (c) 2010, 2011, 2013, 2014, 2015 Jack Kaliko <kaliko@azylum.org>
+# Copyright (c) 2010, 2011, 2013, 2014, 2015, 2020 kaliko <kaliko@azylum.org>
#
# This file is part of sima
#
"""
# pylint: disable=C0111
+import logging
import traceback
import sys
def exception_log():
"""Log unknown exceptions"""
- import logging
- log = logging.getLogger('sima')
+ log = logging.getLogger(__name__)
log.error('Unhandled Exception!!!')
log.error(''.join(traceback.format_exc()))
log.info('Please report the previous message'
return result
return wrapper
-# http client exceptions (for webservices)
+class MPDSimaException(Exception):
+ pass
-class WSError(Exception):
+# http client exceptions (for webservices)
+class WSError(MPDSimaException):
pass
class WSNotFound(WSError):
class WSHTTPError(WSError):
pass
+class PluginException(MPDSimaException):
+ pass
# VIM MODLINE
# vim: ai ts=4 sw=4 sts=4 expandtab