All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.instrumentation.quartz.v2_0.QuartzErrorCauseExtractor Maven / Gradle / Ivy

There is a newer version: 2.8.0-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.instrumentation.quartz.v2_0;

import io.opentelemetry.instrumentation.api.instrumenter.ErrorCauseExtractor;
import org.quartz.SchedulerException;

final class QuartzErrorCauseExtractor implements ErrorCauseExtractor {
  @Override
  public Throwable extract(Throwable error) {
    Throwable userError = error;
    while (userError instanceof SchedulerException) {
      userError = ((SchedulerException) userError).getUnderlyingException();
    }
    return userError;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy