You need to replace the first argument with errorToShow. Otherwise, the local var gets ignored.