You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/26 08:37:02 UTC

[GitHub] [pulsar-client-go] GPrabhudas opened a new issue #477: Fatal on error

GPrabhudas opened a new issue #477:
URL: https://github.com/apache/pulsar-client-go/issues/477


   I see library does `log.fatal` some places which causes app to terminate.
   
   example 👇 
   https://github.com/apache/pulsar-client-go/blob/master/pulsar/schema.go#L99
   https://github.com/apache/pulsar-client-go/blob/master/pulsar/schema.go#L134
   https://github.com/apache/pulsar-client-go/blob/master/pulsar/schema.go#L170
   
    I'm not sure I'm correct. But In general, libraries should not cause the app to terminate. I think that's a decision for the app writer, not the library, to make.
    
    So instead of terminating, why not just return the `error`. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org