[Biojava-dev] Exception wrapping in SimpleRichObjectBuilder

Bubba Puryear bubba.puryear at gmail.com
Wed Jul 5 13:38:29 UTC 2006


Dang - forgot about that. Sorry. Thanks for the fix, though!

On 7/5/06, Richard Holland <richard.holland at ebi.ac.uk> wrote:
> Unfortunately, the IllegalArgumentException(String, Throwable)
> constructor is a Java 1.5 feature, and is not present in Java 1.4 As
> BioJava is currently 1.4-compatible, I can't make this change exactly as
> you make it. However, I did make the equivalent change in the 1.4
> syntax:
>
>         IllegalArgumentException ie = new IllegalArgumentException(.....);
>         ie.initCause(e);
>         throw ie;
>
> This change has been made in CVS.
>
> cheers,
> Richard
>
> On Tue, 2006-07-04 at 12:51 -0400, Bubba Puryear wrote:
> > One last patch for the day - just added some exception wrapping that aided
> > me in some debugging earler:
> >
> > Index: src/org/biojavax/SimpleRichObjectBuilder.java
> > ===================================================================
> > RCS file:
> > /home/repository/biojava/biojava-live/src/org/biojavax/SimpleRichObjectBuilder.java,v
> > retrieving revision 1.7
> > diff -u -r1.7 SimpleRichObjectBuilder.java
> > --- src/org/biojavax/SimpleRichObjectBuilder.java       27 Apr 2006 10:16:29
> > -0000      1.7
> > +++ src/org/biojavax/SimpleRichObjectBuilder.java       4 Jul 2006 19:54:14
> > -0000
> > @@ -32,6 +32,7 @@
> >   * Creates objects and returns them, and stores them in an internal
> >   * map of singletons for reference. Takes up a lot of memory!
> >   * @author Richard Holland
> > + * @author Bubba Puryear
> >   * @since 1.5
> >   */
> >  public class SimpleRichObjectBuilder implements RichObjectBuilder {
> > @@ -75,7 +76,7 @@
> >                  if (i<(paramsList.size()-1)) paramsstuff.append(",");
> >              }
> >              paramsstuff.append(")");
> > -            throw new IllegalArgumentException("Could not find constructor
> > for "+paramsstuff);
> > +            throw new IllegalArgumentException("Could not find constructor
> > for "+paramsstuff, e);
> >          }
> >      }
> > _______________________________________________
> > biojava-dev mailing list
> > biojava-dev at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/biojava-dev
> --
> Richard Holland (BioMart Team)
> EMBL-EBI
> Wellcome Trust Genome Campus
> Hinxton
> Cambridge CB10 1SD
> UNITED KINGDOM
> Tel: +44-(0)1223-494416
>
>



More information about the biojava-dev mailing list