Source code for bw2data.errors
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from eight import *
[docs]
class BW2Exception(Exception):
"""Base class for exceptions in Brightway2"""
pass
[docs]
class InvalidExchange(BW2Exception):
"""Exchange is missing 'amount' or 'input'"""
pass
[docs]
class UnknownObject(BW2Exception):
pass
[docs]
class UntypedExchange(BW2Exception):
"""Exchange doesn't have 'type' attribute"""
pass
[docs]
class WebUIError(BW2Exception):
"""Can't find running instance of bw2-web"""
pass
[docs]
class ValidityError(BW2Exception):
"""The activity or exchange dataset does not have all the required fields"""
pass
[docs]
class NotAllowed(BW2Exception):
"""This operation is not allowed"""
pass
[docs]
class WrongDatabase(BW2Exception):
"""Can't save activities from database `x` to database `y`."""
pass
[docs]
class ReadOnlyProject(BW2Exception):
"""Current project is read only"""
pass
[docs]
class NotFound(BW2Exception):
"""Requested web resource not found"""
pass
[docs]
class PickleError(BW2Exception):
"""Pickle file can't be loaded due to updated library file structure"""
pass