Add global error handler feature