How Can I Use plot2d code for presence of singularities?



If I use plot2d(1/sin(x),[x,-1,1]), I immediately get the
screen response:

    "plot2d: expression evaluates to non-numeric value
                 somewhere in plotting range."

How can I use the plot2d code (only) to capture this
message, and thus quickly detect a singularity in
an arbitrary function (either in interactive use or
in a user defined function)?

Ted Woollett