[Spread-users] Spread Java: SpreadException is not providing cause

Mårten Gustafson marten.gustafson at gmail.com
Thu Aug 20 13:16:54 EDT 2009


Howdy,

What's the chance of getting SpreadException adjusted to incorporate
two new constructors:

    public SpreadException(Throwable cause)
    {
        super(cause);
    }

    public SpreadException(String message, Throwable cause)
    {
        super(message, cause);
    }

And have the Java lib provide cause when throwing a SpreadException?
That would enable us to write code like this

    if(e.getCause() instanceof SocketException)
    {
        // it was a network failure, try to recover/reconnect/whatever
    }
    else
    {
        // we're doomed
    }

I'd be happy to write up a patch for the entire Java lib, just let me know.



Cheers,
Mårten




More information about the Spread-users mailing list