# -*- coding: utf-8 -*-
# auto raise exception
def auto_raise(exception, silent):
if not silent:
raise exception
[docs]class APIError(Exception):
""" Common API Error """
[docs]class APINetworkError(APIError):
""" Failed to load API request """
[docs]class APIJSONParesError(APIError):
""" Failed to parse target """
[docs]class APISignInFailedError(APIError):
""" Failed to Sign in """
[docs]class APIServerResponseError(APIError):
""" Warning if server response only error"""
[docs]class ModelError(Exception):
""" Common Model Error """
[docs]class ModelInitError(Exception):
""" Model Initialize Error """
[docs]class APIServerResponseWarning(Warning):
""" Warning if server response with error"""
[docs]class ModelRefreshWarning(Warning):
""" Model refresh failed """
[docs]class ModelInitWarning(Warning):
""" Warning with init object """