M
Mark
okay let's say i have something like
try {
myBooks.insert(new
Resource("c","ISBN","LCN","publisher","aerg","aergaerg",4,"2006-10-12",156));
myBooks.insert(new
Resource("d","ISBN2","LCN2","publisher2","dbdb","earg",4,"2006-10-11",179));
myBooks.insert(5);
myBooks.insert(new
Resource("a","ISBN2","LCN2","publisher2","g4gaer","vearv",4,"2006-10-11",179));
myBooks.insert(new
Resource("f","ISBN2","LCN2","publisher2","aergaerg34","aervrev",4,"2006-10-11",179));
myBooks.insert(new
Resource("q","ISBN2","LCN2","publisher2","far3w2","rfvaer",4,"2006-10-11",179));
}
catch( ListException le )
{
System.out.println(le);
}
but insert(5) throws an exception. so it prints a nice little error
message.. but then the rest of the inserts are skipped!
how could i get it to print the error, and then continue the rest of
the inserts, throwing exceptions as necessary...without putting a try
catch around each statement? is it possible?
try {
myBooks.insert(new
Resource("c","ISBN","LCN","publisher","aerg","aergaerg",4,"2006-10-12",156));
myBooks.insert(new
Resource("d","ISBN2","LCN2","publisher2","dbdb","earg",4,"2006-10-11",179));
myBooks.insert(5);
myBooks.insert(new
Resource("a","ISBN2","LCN2","publisher2","g4gaer","vearv",4,"2006-10-11",179));
myBooks.insert(new
Resource("f","ISBN2","LCN2","publisher2","aergaerg34","aervrev",4,"2006-10-11",179));
myBooks.insert(new
Resource("q","ISBN2","LCN2","publisher2","far3w2","rfvaer",4,"2006-10-11",179));
}
catch( ListException le )
{
System.out.println(le);
}
but insert(5) throws an exception. so it prints a nice little error
message.. but then the rest of the inserts are skipped!
how could i get it to print the error, and then continue the rest of
the inserts, throwing exceptions as necessary...without putting a try
catch around each statement? is it possible?