This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new dd737a5 Raise errors for program bugs
dd737a5 is described below
commit dd737a5895d7251368384acd960489c038957348
Author: Sebb <[email protected]>
AuthorDate: Sat Jun 13 16:42:04 2020 +0100
Raise errors for program bugs
---
lib/whimsy/asf/svn.rb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index a9eaa8d..fdc72d9 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -281,8 +281,8 @@ module ASF
# - nil, err
# - [cmd] if :dryrun
def self.svn(command, path , options = {})
- return nil, 'command must not be nil' unless command
- return nil, 'path must not be nil' unless path
+ raise ArgumentError.new 'command must not be nil' unless command
+ raise ArgumentError.new 'path must not be nil' unless path
chdir = options.delete(:chdir) # not currently supported for svn_
@@ -380,9 +380,9 @@ module ASF
# Returns:
# - status code
def self.svn_(command, path, _, options = {})
- return nil, 'command must not be nil' unless command
- return nil, 'path must not be nil' unless path
- return nil, 'wunderbar (_) must not be nil' unless _
+ raise ArgumentError.new 'command must not be nil' unless command
+ raise ArgumentError.new 'path must not be nil' unless path
+ raise ArgumentError.new 'wunderbar (_) must not be nil' unless _
# Pick off the options specific to svn_ rather than svn
sysopts = options.delete(:sysopts) || {}