File tree 3 files changed +13
-18
lines changed
3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ target :datadog do
67
67
ignore 'lib/datadog/core/environment/socket.rb'
68
68
ignore 'lib/datadog/core/environment/variable_helpers.rb'
69
69
ignore 'lib/datadog/core/environment/vm_cache.rb'
70
+ ignore 'lib/datadog/core/error.rb'
70
71
ignore 'lib/datadog/core/metrics/client.rb'
71
72
ignore 'lib/datadog/core/metrics/helpers.rb'
72
73
ignore 'lib/datadog/core/metrics/metric.rb'
Original file line number Diff line number Diff line change @@ -12,12 +12,10 @@ class << self
12
12
def build_from ( value )
13
13
case value
14
14
when Error then value
15
- # steep:ignore:start
16
15
when Array then new ( *value )
17
- # steep:ignore:end
18
16
when Exception then new ( value . class , value . message , full_backtrace ( value ) )
19
- when String then new ( nil , value )
20
17
when ContainsMessage then new ( value . class , value . message )
18
+ when String then new ( nil , value )
21
19
else BlankError
22
20
end
23
21
end
@@ -77,7 +75,7 @@ def backtrace_for(ex, backtrace)
77
75
if trace [ 1 ]
78
76
# Ident stack trace for caller lines, to separate
79
77
# them from the main error lines.
80
- trace [ 1 ..-1 ] & .each do |line |
78
+ trace [ 1 ..-1 ] . each do |line |
81
79
backtrace << "\n \t from "
82
80
backtrace << line
83
81
end
Original file line number Diff line number Diff line change 1
1
module Datadog
2
2
module Core
3
3
class Error
4
- attr_reader type : String
4
+ attr_reader type : untyped
5
5
6
- attr_reader message: String
6
+ attr_reader message: untyped
7
7
8
- attr_reader backtrace: String
8
+ attr_reader backtrace: untyped
9
9
10
- interface _ContainsMessage
11
- def message : () -> String
12
- def class : () -> Class
13
- end
14
-
15
- def self.build_from : ((Error | Array[untyped ] | ::Exception | _ContainsMessage | ::String) value) -> Error
10
+ def self.build_from : (untyped value) -> untyped
16
11
17
12
private
18
- def self.full_backtrace : (Exception ex) -> String
19
- def self.backtrace_for : (Exception ex, String backtrace) -> void
13
+ def self.full_backtrace : (untyped ex) -> untyped
14
+ def self.backtrace_for : (untyped ex, untyped backtrace) -> ( nil | untyped )
20
15
21
16
public
22
17
23
- def initialize : (?Object? `type `, ?Object? message, ?Object? backtrace) -> void
18
+ def initialize : (?untyped ? `type `, ?untyped ? message, ?untyped ? backtrace) -> void
19
+
20
+ BlankError: untyped
24
21
25
- BlankError: Error
26
- ContainsMessage: ^(Object) -> bool
22
+ ContainsMessage: untyped
27
23
end
28
24
end
29
25
end
You can’t perform that action at this time.
0 commit comments