improved error displaying

-error message will now display in which function error occured and what
paremeters user sent into it