added function to show error dialogs

wrote a function do print error dialogs.
removed 2 todos.