about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-12-12 09:22:35 +0000
committerEric Wong <normalperson@yhbt.net>2011-12-15 02:13:17 +0000
commit70a529d070920abf0989d3d89d775ea1aa774042 (patch)
tree4687766eba1c0eff2da66ab3d7c689f8d5ea92f5
parentc1cf4444b2ca9126e8450ae3224cd406f0e43624 (diff)
downloadmogilefs-client-70a529d070920abf0989d3d89d775ea1aa774042.tar.gz
Most of these exceptions are just too rare to be useful,
and code that cares for exceptions will rescue them
anyways.
-rw-r--r--lib/mogilefs/backend.rb39
-rw-r--r--test/test_backend.rb8
2 files changed, 0 insertions, 47 deletions
diff --git a/lib/mogilefs/backend.rb b/lib/mogilefs/backend.rb
index a45cbed..c60bd2b 100644
--- a/lib/mogilefs/backend.rb
+++ b/lib/mogilefs/backend.rb
@@ -125,45 +125,6 @@ class MogileFS::Backend
   add_command :set_state
   add_command :replicate_now
 
-  # Errors copied from MogileFS/Worker/Query.pm
-  add_error 'dup'
-  add_error 'after_mismatch'
-  add_error 'bad_params'
-  add_error 'class_exists'
-  add_error 'class_has_files'
-  add_error 'class_not_found'
-  add_error 'db'
-  add_error 'domain_has_files'
-  add_error 'domain_exists'
-  add_error 'domain_not_empty'
-  add_error 'domain_not_found'
-  add_error 'failure'
-  add_error 'host_exists'
-  add_error 'host_mismatch'
-  add_error 'host_not_empty'
-  add_error 'host_not_found'
-  add_error 'invalid_chars'
-  add_error 'invalid_checker_level'
-  add_error 'invalid_mindevcount'
-  add_error 'key_exists'
-  add_error 'no_class'
-  add_error 'no_devices'
-  add_error 'no_domain'
-  add_error 'no_host'
-  add_error 'no_ip'
-  add_error 'no_key'
-  add_error 'no_port'
-  add_error 'none_match'
-  add_error 'plugin_aborted'
-  add_error 'state_too_high'
-  add_error 'size_verify_error'
-  add_error 'unknown_command'
-  add_error 'unknown_host'
-  add_error 'unknown_key'
-  add_error 'unknown_state'
-  add_error 'unreg_domain'
-  add_error 'unreg_class'
-
   def shutdown_unlocked(do_raise = false) # :nodoc:
     @pending = []
     if @socket
diff --git a/test/test_backend.rb b/test/test_backend.rb
index aced57c..2259201 100644
--- a/test/test_backend.rb
+++ b/test/test_backend.rb
@@ -68,14 +68,6 @@ class TestBackend < Test::Unit::TestCase
     end
   end
 
-  def test_size_verify_error_defined
-    # "ErrorError" just looks dumb, but we used to get it
-    # since mogilefs would send us "size_verify_error" and we'd
-    # blindly append "Error" to the exception
-    assert ! MogileFS::Backend.const_defined?('SizeVerifyErrorError')
-    assert MogileFS::Backend.const_defined?('SizeVerifyError')
-  end
-
   def test_make_request
     assert_equal "go! fight=team+fight%21\r\n",
                  @backend.make_request('go!', { 'fight' => 'team fight!' })