Add new function warning() which behaves the same as error() but returns