ESA.util.message_m
index
/home/lfeng/otool/ESA/util/message_m.py

Functions for warning message processing 
 
Authors: L. Feng, Edinburgh University
History: v0.9, 2012.04.30
History: v0.95, 2012.12.01
 
 
1. Parameters
-----------------------------------------------
# action
 
1. msm_action_stop=-3
2. msm_action_wait=-2
3. msm_action_warn=-1
4. msm_action_cont=0
 
# pre-defined error title 
 
5. msm_no_attr='attribute not found: 
6. msm_no_var='variable not found: '
7. msm_wrong_dim='wrong array dimension: '
8. msm_wrong_type='wrong type: '
9. msm_wrong_index='Index is not valid:'
 
 
2. Functions
-------------------------------------
1. show_err_msg  # show error message 
2. write_log_msg # save error message to log files.

 
Modules
       
sys

 
Functions
       
show_err_msg(error_msg, msg_title='', action=-1)
show error message 
 
Inputs:
----------------------------------
1. error_msg:<str>: error message 
2. msg_title:<str>: title for error message
3. action:<integer>: action ID
 
Returns:
----------------------------------------
1.
write_log_msg(logflnm, log_msg)
Save error message into log file 
 
Inputs:
---------------------------------------------------
1. logflnm:<str>: log file name 
2. log_msg:<str>: message to be saved

 
Data
        msm_action_cont = 0
msm_action_stop = -3
msm_action_wait = -2
msm_action_warn = -1
msm_no_attr = 'attribute not found: '
msm_no_var = 'variable not found: '
msm_wrong_dim = 'wrong array dimension: '
msm_wrong_index = 'Index is not valid:'
msm_wrong_type = 'wrong type: '