Skip to content

Commit

Permalink
fix: adding loop exception for interpolator
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Sep 21, 2021
1 parent c9bd3b0 commit f43a583
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LoopStructural/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
from .helper import get_data_axis_aligned_bounding_box, get_data_bounding_box, get_data_bounding_box_map
from .helper import get_dip_vector,get_strike_vector, get_vectors, strike_dip_vector
from .regions import RegionEverywhere
from .exceptions import LoopBaseException, LoopImportError
from .exceptions import LoopException, LoopImportError, InterpolatorError
18 changes: 10 additions & 8 deletions LoopStructural/utils/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
from LoopStructural.utils import getLogger
logger = getLogger(__name__)

class LoopBaseException(Exception):
class LoopException(Exception):
"""
Base loop exception
"""

class LoopImportError(LoopBaseException):
def __init__(self,library,additional_information=None):
error_message = 'Could not import: {}'.format(library)
logger.error('Import error raise message: \"{}\"'.format(error_message))
if additional_information:
logger.error(additional_information)
LoopBaseException.__init__(self,error_message)
class LoopImportError(LoopException):
"""
"""
pass

class InterpolatorError(LoopException):
pass


0 comments on commit f43a583

Please sign in to comment.