Message9547

Author pekka.klarck
Recipients amak, fwierzbicki, pekka.klarck, pjenvey, zyasoft
Date 2015-02-22.18:33:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1424630007.63.0.540520635134.issue1729@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for merging the patch Jim! If I would have implemented it now, I probably would have used a context manager like this instead:

from contextlib import contextmanager

@contextmanager
def map_java_exception(exception_map):
    try:
        yield
    except tuple(exception_map) as err:
        exp = exception_map[type(err)]
        raise exp(err.getMessage())

with map_java_exception({IllegalArgumentException: ValueError}):
    # ...
History
Date User Action Args
2015-02-22 18:33:27pekka.klarcksetmessageid: <1424630007.63.0.540520635134.issue1729@psf.upfronthosting.co.za>
2015-02-22 18:33:27pekka.klarcksetrecipients: + pekka.klarck, fwierzbicki, amak, pjenvey, zyasoft
2015-02-22 18:33:27pekka.klarcklinkissue1729 messages
2015-02-22 18:33:27pekka.klarckcreate