Sha256: 3661d934fc64b7ad0c0c0f4b6bb87b3128cc1ab468f29c627b844eaa17ac7305

Contents?: true

Size: 1.85 KB

Versions: 17

Compression:

Stored size: 1.85 KB

Contents

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


require "google/cloud/errors"

module Google
  module Cloud
    module Trace
      ##
      # # AsyncReporterError
      #
      # Used to indicate a problem preventing traces from being buffered
      # asynchronously. This can occur when there are not enough resources
      # allocated for the amount of usage.
      #
      class AsyncReporterError < Google::Cloud::Error
        # @!attribute [r] count
        #   @return [Array<Google::Cloud::Trace::TraceRecord>] traces The trace
        #   objects that were not written to the API due to the error.
        attr_reader :traces

        def initialize message, traces = nil
          super(message)
          @traces = traces if traces
        end
      end

      ##
      # # AsyncPatchTracesError
      #
      # Used to indicate a problem when patching traces to the API. This can
      # occur when the API returns an error.
      #
      class AsyncPatchTracesError < Google::Cloud::Error
        # @!attribute [r] count
        #   @return [Array<Google::Cloud::Trace::TraceRecord>] traces The trace
        #   objects that were not written to the API due to the error.
        attr_reader :traces

        def initialize message, traces = nil
          super(message)
          @traces = traces if traces
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
google-cloud-trace-0.40.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.39.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.38.3 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.38.2 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.38.1 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.38.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.37.1 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.37.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.36.1 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.36.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.35.0 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.5 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.4 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.3 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.2 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.1 lib/google/cloud/trace/errors.rb
google-cloud-trace-0.34.0 lib/google/cloud/trace/errors.rb