The problem is not with my longfunction STDERR, or even with the mason STDERR. If inside my longfunction I print to STDERR I get the message in error_log, and the same happens when I print to STDERR after the call to this component.
My problem is that Mason seems to terminate my component and behave like everything is ok.
This component is not complemently run, but everything after its call in the caller is runned normally. My final page is created as if this component runned completly ok but didn't sent any output.