use error dialog instead of raise error