changed generic warning and error handlers to output the toPosition instead of the fromPosition