R2022a problem: Line number missing in error message sent to Command Window.

75 views (last 30 days)
With R2022a, line numbers are sometimes omitted in error messages. Here's an example using a trivial script:
If I run the same script in R2021b, here's the result:
Weird. What's going on?
Is there a way to fix this in R2022a?
  5 Comments
David Szwer
David Szwer on 17 May 2022
I get this problem too; also regarding tables, but a different error.
>> ProcessAll
Error using ProcessMovement
All tables being vertically concatenated must have the same number of variables.
Error in ProcessAll (line 10)
[moving, moveN] = ProcessMovement(filedir, 0);
Note that ProcessAll and ProcessMovement are both functions. Back in the day, Matlab wouldn't show line numbers at all if the error was in a script; this isn't a reversion to that behaviour, it is something different.

Sign in to comment.

Accepted Answer

Siddharth Bhutiya
Siddharth Bhutiya on 18 May 2022
This is a bug, thank you for reporting it! I have passed it along and it will be fixed in a future release.
As mentioned in the bug report, while this is being fixed, you could use MException.last.stack(1) to see the line number.
  5 Comments
Adam Danz
Adam Danz alrededor de 2 horas ago
@Sergio Roche, the bug report refers to errors caused by invalid indexing of tables or timetables.
If you have an error that used to show the stack trace in previous version of MATLAB and now no longer shows the stack trace, I suggest creating minimal reproduction steps and asking a new question. Include the MATLAB release info and feel free to tag me.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by