# Recover result after “Set” error

I have a function someFunction[] that takes a long time to evaluate. I would like to run

{time, result} = Timing@someFunction[];


to also measure the execution time. Instead, I forgot to include Timing@ and wrote

{time, result} = someFunction[];


This ran for a long time, but right at the end when the value was supposed to be assigned a "Set: Lists {time, result} and <<1>> are not the same shape." error was thrown, and I got nothing out. Is there a way to still recover the result of the computation? It would be a shame if there wasn't - the result was already computed, and just the assignment failed.

• in 11.2 there should be a menu next to the error message with a "show stack" item. – Kuba Jan 25 '18 at 18:22
• Hm, strange, thought of it as well, but when I was looking for it when I had the error and I swear it wasn't there. Are there cases where "Show Stack" doesn't appear in the pop-up? – Stan Jan 25 '18 at 19:45
• Just a side note, I always prefer to do something like timing = AbsoluteTiming[ result = someFunction[] ]; – Jason B. Jan 25 '18 at 22:18

From my comment:

\$Line=0;
{a, b} = (Pause[1]; 10);

Out[1]


Set::shape: Lists {a,b} and 10 are not the same shape.

10

• Hi Carl, that's true, however, if the output of the function is long then parts of it are shortened to <<1>> and you can't copy-paste them any more. – Stan Jan 25 '18 at 19:40
• @Stan I don't understand. Out[n] always contains the full output, it does not contain any shorteners. – Carl Woll Jan 25 '18 at 19:49
• Hi Carl, sorry, I misread your reply. That's interesting - no "Out" cell is produced, but it's still created behind the scenes, and it contains the output I'm looking for. That's good to know. Thanks! – Stan Jan 25 '18 at 20:13