spaceship/lib/spaceship/base.rb in fastlane-2.122.0.beta.20190425200104 vs spaceship/lib/spaceship/base.rb in fastlane-2.122.0.beta.20190426200020
- old
+ new
@@ -1,5 +1,7 @@
+require_relative 'globals'
+
module Spaceship
##
# Spaceship::Base is the superclass for models in Apple Developer Portal.
# It's mainly responsible for mapping responses to objects.
#
@@ -62,9 +64,12 @@
def to_json(*a)
h = @hash.dup
h.delete(:application)
h.to_json(*a)
+ rescue JSON::GeneratorError => e
+ puts("Failed to jsonify #{h} (#{a})") if Spaceship::Globals.verbose?
+ raise e
end
def to_h
@hash.dup
end