Replace warning() with error() and actually use it. :-)