I am using pro c as a part of development.

I would like to know how to capture specific errors?

right now I am routing all error and warning to a fucntion.

For example

how to handle this error?

SQL-02112: SELECT..INTO returns too many rows


can anyone show me an example of doing this?