correct raising of errors