Source code for mylinux.constants.error

"""
Here are contained all error messages that are used
for error report, raising exception, etc...
"""

#:
newErrorDiscoveryMsg = 'UKNOWN ERROR: Inform mylinux developers obout this error...'
#:
singletone = 'Singletone has been already inited'

[docs]class Format(object): """ Class for filing missing msg. strings. """ @staticmethod
[docs] def keyMissingIn(key, where): """ Args: key (str): What key is missing. where (str): Where is key missing. Return: Logical msg. string. """ return '"{0}" key is missing in "{1}"'.format(key, where)
@staticmethod
[docs] def keyNotValidFor(key, what): """ Args: key (str): What key is not valid. what (str): Why is not valid. Return: Logical msg. string. """ return '"{0}" not valid for "{1}"'.format(key, what)
@staticmethod
[docs] def alreadyExistIn(where): """ Args: where (str): Where object already exist. Return: Logical msg. string. """ return 'Already exist in "{0}"'.format(where)
@staticmethod
[docs] def notInstalled(): """ Return: Logical msg. string. """ return 'Not yet installed'
@staticmethod
[docs] def notExistIn(where): """ Args: where (str): Where object not exist. Return: Logical msg. string. """ return 'Not exist in "{0}"'.format(where)
@staticmethod
[docs] def notFoundIn(what, where): """ Args: what (str): What is not found. where (str): Where is not found. Return: Logical msg. string. """ return '"{0}" is not found in "{1}"'.format(what, where)