From 630b1e3f897bba787ee743cdd97365e845b7948a Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Sat, 14 Jun 2014 09:28:08 -0400 Subject: [PATCH 1/2] add more detail to plist parse error messages --- lib/cask/system_command.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cask/system_command.rb b/lib/cask/system_command.rb index 10dc94cf4fc79..f22104929c4ec 100644 --- a/lib/cask/system_command.rb +++ b/lib/cask/system_command.rb @@ -63,11 +63,13 @@ def self._parse_plist(command, output) raise Plist::ParseError "Empty XML output" end xml - rescue Plist::ParseError + rescue Plist::ParseError => e raise CaskError.new(<<-ERRMSG) Error parsing plist output from command. command was: #{command.utf8_inspect} + error was: + #{e} output we attempted to parse: #{output} ERRMSG From d61f16580696fb862bf445d49899de6cff2bba3a Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Sat, 14 Jun 2014 09:28:27 -0400 Subject: [PATCH 2/2] fix typo in comments --- lib/plist/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plist/parser.rb b/lib/plist/parser.rb index 5aa1621a55c9a..e73c0d9bce37f 100644 --- a/lib/plist/parser.rb +++ b/lib/plist/parser.rb @@ -17,7 +17,7 @@ module Plist # + Date elements are returned as DateTime objects. # + Data elements are implemented as Tempfiles # -# Plist::parse_xml will blow up if it encounters a data element. +# Plist::parse_xml will blow up if it encounters a Date element. # If you encounter such an error, or if you have a Date element which # can't be parsed into a Time object, please send your plist file to # plist@hexane.org so that I can implement the proper support.