主要内容

mlreportgen.dom.errormessage类

包裹:mlreportgen.dom
超类:

描述

指定来自指定源对象的错误消息文本。

建造

errormsgobj= errormessage(文本,,,,sourceObject使用指定的文本创建一个错误消息,该文本源自指定的源对象。

输入参数

展开全部

The text to display for the message.

消息起源的DOM对象。

输出参数

展开全部

错误消息,由mlreportgen.dom.errormessage目的。

特性

展开全部

此文档元素的ID,指定为字符向量或字符串标量。当DOM创建文档元素时,该DOM会生成一个唯一的ID。您可以指定自己的ID。

消息起源的源dom对象。

该文档元素的标签,指定为字符向量或字符串标量。

DOM将生成一个唯一标签作为此对象创建的一部分。生成的标签具有表单类:ID,其中类是对象类,而ID是ID对象的属性。指定自己的标签值可以帮助您确定文档生成期间问题的位置。

消息文本,指定为字符向量。

方法s

利用错误信息类似于您使用的方法进度方法。

方法

目的

格式化

格式消息作为html。

formatastext

格式消息作为文本。

通过

确定消息是否通过过滤器。

例子

全部收缩

进口mlreportgen.dom。*;d =文档('测试',,,,'html');dispatcher = messagedisPatcher.getThedisPatcher;l = addListener(调度程序,'信息',,,,...@(src,evtdata)disp(evtdata.message.formatastext));打开(d);
dom.document:232开放dom.document:232解析模板“ /mathworks/devel/bat/bat/bdoc2a/build/matlab/matlab/matlab/toolbox/toolbox/shared/mlreportgen/mlreportgen/resources/reresources/templetates/templetates/html/html/default.html/default.htmtx,232附录dom.templateText:248 dom.document:232附录dom.templateText:251 dom.document:232附录dom.templateText:254 dom.document。
调度(调度程序,errormessage('invalid chapter',d));
dom.Document:232 invalid chapter
p = Paragraph('章节 ');p.tag ='chapter title';p.STYLE = {ounderinc('章节'),...反向('桌子'),空格('pre')}; append(p,AutoNumber('章节');附加(d,p);
dom.document:232附录章节标题
关闭);
dom.document:232附加dom.templateText:269 dom.document:232移动到孔“#end#” dom.document:232关闭
rptView(d.OutputPath);

删除侦听器,以避免在MATLAB®会话期间重复报告消息对象。

删除(l);

也可以看看