PSR-1/2 and on error listener