source: MML/trunk/mml/links/tango/tango_print_error_stack_as_it_is.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 964 bytes
Line 
1function tango_print_error_stack_as_it_is(tango_error_stack)
2%  TANGO_PRINT_ERROR_STACK_AS_IT_IS - Used to print the error stack in group
3%
4%  INPUTS
5%  1. tango_error_stack
6%
7%
8%  See example of use in gethbpmgroup
9
10%  Adapted from N. Leclercq by Laurent S. Nadolski
11
12
13% get the error stack
14err_stack = tango_error_stack;
15% display each DevError in the array
16[err_stack_m, err_stack_n] = size(err_stack);
17stars(1:60) = char('*');
18disp(stars);
19disp('*                    TANGO ERROR STACK                     *')
20disp(stars);
21for i = 1:err_stack_n
22  disp(sprintf('- ERROR %d\r', i));
23  %- print reason
24  disp(sprintf('\t|-reason.....%s\r',err_stack(1,i).reason));
25  %- print desc
26  disp(sprintf('\t|-desc.......%s\r',err_stack(1,i).desc)); 
27  %- print origin
28  disp(sprintf('\t|-origin.....%s\r',err_stack(1,i).origin));
29  %- print severity
30  disp(sprintf('\t|-severity...%s (%d)\r',err_stack(1,i).severity_str, err_stack(1,i).severity));
31end
32disp(stars)
33return;
Note: See TracBrowser for help on using the repository browser.