Package nMOLDYN :: Package Core :: Module Error |
[hide private]
[frames] | no frames]

# Source Code for Module nMOLDYN.Core.Error

     1  # The python distribution modules
     2  import os
     3  import sys
     4  import traceback
     5
     6  # The nMOLDYN modules
     7  from nMOLDYN.Core.Logger import LogMessage
     8
     9 -class Error(Exception):
    10
    11 -    def __init__(self, message):
    12          """
    13          The constructor.
    14          """
    15
    16          self.errorMsg = str(message)
    17
    18          LogMessage('error',self.errorMsg + '\n\nPlease look in the log file for more details.', ['gui','console'])
    19
    20          tb = traceback.format_exc()
    21          if tb.strip() != 'None':
    22              self.errorMsg += '\n\n' + tb
    23
    24          LogMessage('error',self.errorMsg, ['file'])
    25