Added a program and a block error handler

Block error handler picks up block type via an argument.