Optimized error mechanism.