Errhandle

errhandling mechanism complete