fix error loged for dynamic exception msgs