34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/jets/poly_fun.rb', line 34
def raise_error(resp)
backtrace = resp["stackTrace"] + caller
backtrace = backtrace.map { |l| l.sub(/^\s+/,'') }
backtrace = backtrace.map do |l|
if l.include?(Jets.build_root) && !l.include?("lambda_executor.")
l.sub(/\/tmp\/jets.*executor\/\d{8}-+.*?\//, '')
else
l
end
end
error_class = "Jets::PolyFun::#{task.lang.to_s.camelize}Error".constantize
raise error_class.new(resp["errorMessage"], backtrace)
end
|