Creating a matlab error with idents creates the wrong structure?!?

1 回表示 (過去 30 日間)
Yoav Romach
Yoav Romach 2014 年 6 月 24 日
コメント済み: Yoav Romach 2014 年 6 月 24 日
Hey,
I'm trying to work according to this, but something doesn't work right...
Check this code:
try
error('msgIdent','msgString')
catch err
err
end
err =
MException with properties:
identifier: ''
message: 'msgIdent'
cause: {0x1 cell}
stack: [0x1 struct]
I would expect the id to be msgIdent and the message to be msgString... This is almost exactly the same as their example, so I can't figure out what is wrong...
  1 件のコメント
Yoav Romach
Yoav Romach 2014 年 6 月 24 日
Ok, I've understood it, the msgIdent must be in the format of 'a:b'.
My original code was 'a:b:c' and that also doesn't work, so I'll just change it...

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeError Handling についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by