source: an2_errordump.m @ 44

Last change on this file since 44 was 37, checked in by tjniskan, 11 years ago
  • Renamed analyze2.m to aedes.m
  • Changed all references to "Analyze2" -> "Aedes" (hopefully I didn't

break anything...)

  • Added some nifti-tools to misclib
  • Fixed bug in an2_readfid.m that occurred when reading EPI-data

(thanks Teemu)

M an2_export_gui.m
D analyze2.m
M an2_getfilefilter.m
M an2_calc_wait.m
A misclib/nifti4dto3d.m
A misclib/nifti3dto4d.m
A misclib/filter_fmri_data.m
M misclib/dcm_info.m
M an2_cellwrite.m
M an2_revision.m
M startup.m
M an2_readprocpar.m
M an2_fitmaps.m
M an2_read_nifti.m
M an2_data_read.m
D about_analyze2.png
M an2_resviewer.m
M an2_maptool.m
A aedes.m
M an2_helpabout.m
M plugins/save_roi_as_mask.m
M plugins/calculate_t2_map.m
M an2_inputdlg.m
M an2_readctdata.m
M an2_readfid.m
M an2_readfidprefs.m
M an2_readtab.m
M an2_check_updates.m
A about_aedes.png
M an2_saveres.m
M an2_editstack.m
M an2_errordump.m
M an2_update.m
M an2_write_nifti.m

File size: 1.8 KB
Line 
1function an2_errordump(errorstruct)
2% AN2_ERRORDUMP - Write the lasterror structure into file
3%   
4%
5% Synopsis:
6%
7% Description:
8%
9% Examples:
10%
11% See also:
12%
13
14% This function is a part of Aedes - A graphical tool for analyzing
15% medical images
16%
17% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
18%
19% Department of Physics, (or Department of Neurobiology)
20% University of Kuopio, FINLAND
21%
22% This program may be used under the terms of the GNU General Public
23% License version 2.0 as published by the Free Software Foundation
24% and appearing in the file LICENSE.TXT included in the packaging of
25% this program.
26%
27% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
30
31debug=false;
32
33if debug
34  keyboard
35else
36  % Construct file name and path for the errordump file
37  error_dir = [prefdir(1),filesep];
38  error_fname =['aedes_errordump_',datestr(now,30),'.mat'];
39 
40  % Get revision information
41  [rev,repo]=an2_revision;
42 
43  % Save the errorstruct
44  save([error_dir,error_fname],'errorstruct','rev','repo','-mat')
45 
46
47  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48  % Error dialog
49  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50  hh=errordlg({['An unexpected error has occurred with Aedes!',...
51        'This is probably a bug','',...
52        'The error dump was written into following file:'],...
53        ['"',error_dir,error_fname,'"'],'','',...
54        'The returned error message was:',...
55        errorstruct.message,errorstruct.identifier,'',...
56        ['If you get this error dialog every time you try to close Aedes ' ...
57        'main window, run the command "an2_killfigs" in the Matlab ' ...
58        'workspace. This will delete ALL currently open Matlab figures ' ...
59        'with brute force!!!']},...
60        'UNEXPECTED ERROR','modal');
61end
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008