influxdb-client-java icon indicating copy to clipboard operation
influxdb-client-java copied to clipboard

Question : logs or throwing exceptions ?

Open AmbroiseS opened this issue 2 months ago • 0 comments

Question:

Is there a reason we are logging here and other places, instead of throwing an exception ?

I'd be intersted in suppressing logs from InfluxDb but i still want to be able to know what kind of connection error I get.

Is it too expensive to throw exceptions?

Best regards

   @Nullable
   public Ready ready() {
       Call<Ready> call = this.readyService.getReady((String)null);
       try {
           return (Ready)this.execute(call);
       } catch (InfluxException e) {
           LOG.log(Level.WARNING, "The exception occurs during check instance readiness", e);
           return null;
       }
   }

AmbroiseS avatar Nov 04 '25 10:11 AmbroiseS