加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
PTerrorMessages.m 1007 Bytes
一键复制 编辑 原始数据 按行查看 历史
Brian White 提交于 2019-09-30 20:58 . Add files via upload
function [errorMessage] = PTerrorMessages(message_string, err)
%% Displays Matlab error messages in a popup so users can report specific errors for development and debugging purposes
% - B. White
%
% ----------------------------------------------------------------------------------
% "THE BEER-WARE LICENSE" (Revision 42):
% <brian.white@queensu.ca> wrote this file. As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a beer in return. -Brian White
% ----------------------------------------------------------------------------------
%
errorMessage = sprintf(['Error in ' message_string ' \n\n Message:\n%s'], err.message);
% Display pop up message and wait for user to click OK
% Print to command window.
fprintf(1, '%s\n', errorMessage);
uiwait(warndlg(errorMessage));
%close % in a previous version, the program would close following an error, but this was problematic
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化