Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams SQLCA.DBMS = "ODBC" SQLCA.AutoCommit = False SQLCA.DBParm = "ConnectString='DSN=demo;UID=;PWD='" CONNECT; tab_kava.tabpage_member.dw_kava_member.settransobject(sqlca) tab_kava.tabpage_member.dw_kava_member.retrieve() catch(DWRuntimeError myExc) MessageBox ("DWRuntimeError", "Errortext") end try

You're almost there. The dwRunTimeError class, (your "myExc" in this case), will contain error and diagnostic information.

For example, something like:

catch(DWRunTimeError myExc)
  messageBox( "DWRuntimeError", myExc.errorText )

You can also stack exception "catch" clauses, from most restrictive to most general, and the exception will be caught by the first one that it qualifies for. You're using a DWRuntimeError - what if the error being thrown is just a RuntimeError? Your existing clause would ignore it, and the systemerror event would trigger.

-Paul-

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.