Question: question on use of TSprintf

I am using this proc by Carl Love posted here

https://www.mapleprimes.com/questions/211401-How-Do-I-Print-Text-Followed-By-Math

TSprintf:= proc() 
   local e;
   uses T= Typesetting; 
   T:-mrow(seq(`if`(e::string, T:-mn(e), T:-Typeset(T:-EV(e))), e= [args])) 
end proc:

when I do 

         TSprintf("Solving ", diff(y(x),x)=x);   

it works fine and it prints on the screen as expected. 

The problem is that inside a proc, if I use an error() later on, the message do not show up

foo:=proc()
   TSprintf("Solving ", _passed);   
   error "opps"
end proc;

And now when I call it like this 

  foo(diff(y(x),x)=x);
      Error, (in foo) opps   # Where the message "solving...." gone?? it does not show on the screen

I only see the "opps" and never see the message.  If I remove error(), then it shows up. But with standard printf, both show up

foo:=proc()   
   printf("Solving %a", _passed); 
   error "opps";
end proc;


foo(diff(y(x),x)=x);
    Solving diff(y(x),x) = x  # printf message shows OK
    Error, (in foo) opps      # from error 
 

Why TSprintf message do not show up if there is an error() after it?

Please Wait...