>> Doing it leads to laborious try catch blocks in all the client code using the API.
I totally agree - it seems the only benefit of this is to try and catch errors during development/compile time and is extra processing and not useful in production.
 
Here is a snippet of one of the constructors of the classes - remember these follow the Value Object pattern so they're really data containers with no real brains built in 'em:
 
public class PackageSkuValueObject extends SkuValueObject implements Serializable
{
    private String pkgSkuId;
 
    public void PackageSkuValueObject(String skuId) throws InventoryAppException
    {
        if (skuId == null)
            throw new InventoryAppException(1009010);
 
        pkgSkuId = skuId;   
    }
}
-----Original Message-----
From: John O'Sullivan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 9:13 AM
To: [EMAIL PROTECTED]
Subject: exceptions

I (almost almost) never to it.

 

Doing it leads to laborious try catch blocks in all the client code using the API.

 

Post some code so we can see the context of the exception being thrown and caught.

 

Without knowing the context of the code - I think that the calling code should make sure all the data is there before calling the constructor.

 

I would really like to see a snippet of code.

 

 

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to