You can include a SETERR in the object definition and it will take effect whenever running in the object.
For Example:
0010 DEF CLASS "a"
0020 SETERR Trap_it
0030 PROPERTY name$
0040 FUNCTION Divide(x)
0050 ENTER x
0060 LET a=100/x
0070 RETURN a
0080 END DEF
0090 !
0100 Trap_It:
0110 PRINT "Err=",ERR," line ",ERS
0120 EXIT ERR
->a=new("A")
->?a'divide(10)
10
->?a'divide(7)
14.29
->?a'divide(0)
Err= 40 line 60
Error #40: Divide check or numeric overflow
->