On Friday 10 Oct 2014 12:34:07 you wrote:
> I think I will keep it the way it is, because it allows me to make the log
> message type different per exception and the message different for each. I
You could still do that with the single callback, FWIW.
> choose not to catch general exceptions, do you think this is a good idea?
> Or should I just catch all exceptions and maaslog as an unknown error
> printing the exception message.
I think the service has a general catch-all at the top doesn't it? Remember
that the service stops completely if there's any exception, so make sure
that's the case. I think it's fine to omit the catch-all here if there's one
at the top of the service.
Right, I'll go and test this now, the code looks much nicer now with the
semaphore.
On Friday 10 Oct 2014 12:34:07 you wrote:
> I think I will keep it the way it is, because it allows me to make the log
> message type different per exception and the message different for each. I
You could still do that with the single callback, FWIW.
> choose not to catch general exceptions, do you think this is a good idea?
> Or should I just catch all exceptions and maaslog as an unknown error
> printing the exception message.
I think the service has a general catch-all at the top doesn't it? Remember
that the service stops completely if there's any exception, so make sure
that's the case. I think it's fine to omit the catch-all here if there's one
at the top of the service.
Right, I'll go and test this now, the code looks much nicer now with the
semaphore.