O'Reilly logo

APIs at Work, Second Edition by Ron Hawkins, Doug Pence, Bruce Vining

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Error Handling

Most APIs accept an error-handling data structure, although UNIX-type APIs, and high-level, language-independent, ILE CEE-type APIs do not. If you include this structure when you call the API and an error occurs, you can have the system not generate CPF error messages for the world to see (and have your application program end). Instead, the API can fill in fields in this data structure describing the error that occurred. Your program can then take appropriate actions based on the error.

While the error parameter might be optional on some APIs, you should not consider it optional in your work. If you don’t code to handle errors and an error does occur, i5/OS has been known to throw up some pretty cryptic error messages—just to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required