Coder RuntimeChecks Error Line Numbers

2 ビュー (過去 30 日間)
Michael
Michael 2022 年 10 月 28 日
コメント済み: Michael 2022 年 10 月 31 日
If I turn on RuntimeChecks in my coder config for C or C++ code generation (cfg.RuntimeChecks = true; codegen my_function -args {} -config cfg), when I get an error reported at runtime, are the reported line numbers for the generated C/C++ files or for the associated .m files from which the C/C++ code is derived?
For example, I have a class called 'waveform.m' and got the error at runtime of:
Caught exception: Subscripted assignment dimension mismatch: [1][2] ~= [0][2].
Error in waveform/finepulse (line 662)
After reviewing the lines for waveform.m and waveform.cpp (generated code), I think line 662 refers to my .m file, but would like confirmation. I don't see this discussed anywhere on this page.
Thanks!

採用された回答

Mukund Sankaran
Mukund Sankaran 2022 年 10 月 31 日
Hi Michael,
The line numbers are associated with your .m files. If you open the code generation report for your example, and click on a message in the "All Messages" table, it should take you to the associated line in your .m file.
Hope this helps!
  1 件のコメント
Michael
Michael 2022 年 10 月 31 日
Great. Thanks so much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by