Sha256: f346233088d06953cd610ba79c5c6f1a5d1a39861723dbd62ac5019fe18d918c
Contents?: true
Size: 1.49 KB
Versions: 18
Compression:
Stored size: 1.49 KB
Contents
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require_relative 'base' require_relative 'message' module Contrast module Agent module Telemetry module Exception # This class will hold the basic information for a Parent Telemetry Exception Event class Event < Contrast::Agent::Telemetry::Exception::Base # Array of Telemetry Exceptions # @return [Array<Contrast::Agent::Telemetry::Exception::Message>] attr_reader :exceptions # Initialization of the Parent Event requires us to require the exception # to be created # # @param message [Contrast::Agent::Telemetry::Exception::Message] # @raise[ArgumentError] def initialize message super() validate_class(message, Contrast::Agent::Telemetry::Exception::Message, 'exception_message') @exceptions = Array.new(1, message) end # @param message [Contrast::Agent::Telemetry::Exception::Message] # @raise[ArgumentError] def push message validate_class(message, Contrast::Agent::Telemetry::Exception::Message, 'exception_message') @exceptions << message end def self.path '/error' end def to_controlled_hash exceptions.map(&:to_controlled_hash) end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems