File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog Cobalt
22
3+ ## v5.9.5 (30-06-2019)
4+ - Adding json to underlying error when present
5+
36## v5.9.4 (20-06-2019)
47- Adding underlying error instead of unknown error
58
Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = "Cobalt"
3- s . version = "5.9.4 "
3+ s . version = "5.9.5 "
44 s . author = { "Bas van Kuijck" => "[email protected] " } 55 s . license = { :type => "MIT" , :file => "LICENSE" }
66 s . homepage = "http://www.e-sites.nl"
Original file line number Diff line number Diff line change @@ -53,9 +53,14 @@ public class Error: Swift.Error {
5353 return Error ( code: 301 , message: message)
5454 }
5555
56- public static func underlying( _ error: Swift . Error ) -> Error {
56+ public static func underlying( _ error: Swift . Error , json : JSON ? = nil ) -> Error {
5757 let apiError = Error ( code: 601 )
5858 apiError. underlyingError = error
59+
60+ if json != nil {
61+ apiError. json = json
62+ }
63+
5964 return apiError
6065 }
6166
@@ -85,6 +90,9 @@ public class Error: Swift.Error {
8590 default :
8691 break
8792 }
93+
94+ _clone ( from: Error . underlying ( error, json: json) )
95+ return
8896 }
8997
9098 _clone ( from: Error . underlying ( error) )
You can’t perform that action at this time.
0 commit comments