[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersisten
From: |
Stuart Ballard |
Subject: |
Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields |
Date: |
Sun, 11 Dec 2005 21:42:13 -0500 |
On 12/11/05, Guilhem Lavaux <address@hidden> wrote:
> Bah ! I would rather use a native function that will throw directly
> InvalidClassException. The problem is that's will be anyway hidden to
> the general user and that he/she may be surprised getting that sort of
> exception.
I dunno, this seems pretty clean if it works:
public class Throw {
private static Throwable t;
public Throw() throws Throwable {throw t;}
public static synchronized void uncheckedThrow(Throwable t) {
Throw.t = t;
try {
Throw.class.newInstance();
} catch (InstantiationException e) {
} catch (IllegalAccessException e) {
}
}
}
Throw.uncheckedThrow(new InvalidClassException("..."));
A perfectly portable illegal-exception-thrower :)
--
http://sab39.dev.netreach.com/
- [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/10
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/11
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/11
- Re: [cp-patches] RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Stuart Ballard, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Archie Cobbs, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/11
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields,
Stuart Ballard <=
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/12
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Guilhem Lavaux, 2005/12/14
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Mark Wielaard, 2005/12/17
- Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields, Robert Schuster, 2005/12/12