Improve source location tracking for TR classes

Closes PR 14400
Adjust TR class error messages

Use the new error message format for most cases.
Convert some internal errors to use int-err.
Improve code for checking init args for TR classes