https://groups.google.com/d/msg/harbour-devel/WFnOTGO91gk/RdLiu_JyAWYJ
Today I tried to understand Przemek's words again:
Such redirection should be implemented using GT API
because it will in all cases, is portable and much simpler.
Anyhow it's still not necessary because we have PRG API for it
so it's enough to catch RTE.
And after carefully reviewing Przemek's source code, I found the right way to do it. There is an undocumented second parameter than when specified as .T. it generates RTE (run time errors) that we can easily catch:
ErrorBlock( { | o | MsgInfo( o:Description ), DoBreak() } )
oHrb = HB_CompileFromBuf( cCode, .T., "-n" ) // The .T. does the magic
better later than never