20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9<br />

Troubleshooting<br />

Objectives - In this chapter we deal with some of the problems that could be encountered<br />

while developing a custom application using e.<strong>net</strong> solutions. We deal with error handling<br />

and some general troubleshooting tips.<br />

Every programmer knows that no matter how hard they try to program correctly, there will<br />

always be something that does not work out as planned. In this chapter we present a few<br />

issues that have caused problems for past e.<strong>net</strong> solutions programmers so that you can<br />

learn from their experience and be aware of these issues.<br />

9.1. Error Handling<br />

In e.<strong>net</strong> solutions errors are automatically generated when critical problems are<br />

encountered.<br />

There are three instances where an error can occur:<br />

i. COM: Errors received by COM will result in an exception being raised. This generally<br />

happens when a business object cannot complete its' task, or when it receives an<br />

unexpected parameter. The result is the abnormal termination of the process.<br />

Example 9.1. Error: Unexpected Parameter Sent<br />

The XML Schema (INVQRY.XSD) associated with the Inventory Query object<br />

(INVQRY) accepts specific elements. If one of the elements received is not supported<br />

by the Schema an exception is raised. Therefore, if the spelling of the element<br />

is incorrect an exception will be raised.<br />

The Inventory Query object (INVQRY) requires a valid stock code - if<br />

the stock code is not valid then the object cannot continue and an<br />

exception is raised.<br />

ii. Business object: Errors received from the failure of a requested operation are written to<br />

the XML string returned by the business object. The error does not raise an exception to<br />

COM. Consequently processes are not terminated.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!