The trap works when division by a variable which's value is zero.
I'm no guru though
$zero = 0
trap { "Got it : division by zero !" } 1/$zero; "next"
....or in the pipe:
1,6,9,0 | foreach-object {trap { "Got it : division by zero !" } 1/$_ };
"next"
--
Kiron