applescript errors in a window

is there anyway to make applescripts errors be displayed in a textview instead of the dialog window?

Separated posts; Asking unrelated questions makes it harder to search.

Other question: Check if file exists