def print_general_exception(a_exception, a_parsed_args): """ print general exception. Complex case depending on the passed options and the fact the console handler might not have been instanciated. """ # check that the console hanlder has been set by the factory if LoggerFactory.is_console_handler_set(): LoggerFactory.get_logger("Runner").error( "%s. For more information see the log file %s.\nTry `generate_NG_arr --help (or -h)' for more information." % (a_exception, Conf.get_instance().get("Logging", "fileLogging", "/tmp/rnpicker.log")) ) if a_parsed_args.get("verbose", 1) == 3: a_logger = LoggerFactory.get_logger("Runner").error else: a_logger = Runner.log_in_file a_logger("Traceback: %s." % (get_exception_traceback())) else: # cannot get general logger so print print ("Fatal Error: Traceback: %s." % (get_exception_traceback()))