This project is read-only.

"Include caught as inner" fails if inner is not last argument


catch (Exception e)
    throw new OuterException(e, "Foo");
Here Exceptional suggests CA "Include caught exception as inner exception" which incorrectly appends x to the end of the argument list:
    throw new OuterException(e, "Foo", e); // won't compile
Perhaps OuterException doesn't follow the standard convention, but in my particular case it cannot be avoided.


jpickwell wrote Apr 13, 2015 at 9:52 PM

This is also the case when the inner exception is the only argument.
catch(Exception ex)
    // Warning: "Caught exception should be passed as inner exception."
    throw new OuterException(ex);

rsuter wrote Apr 15, 2015 at 9:31 AM