Resolves Issue #155

This commit is contained in:
BJ Dierkes 2012-08-03 16:14:33 -05:00
parent 2b294739d9
commit 560737554a
3 changed files with 5 additions and 27 deletions

View File

@ -54,6 +54,11 @@ Incompatible Changes:
* Removed cement.handler.enabled(). Now use `handler.registered()`
instead.
Misc:
* :issue:`155` - Removed unused CementArgumentError, and
CementConfigError. These types of exceptions should be defined at
the application level.
1.9.14 - Sun Jul 16, 2012
------------------------------------------------------------------------------

View File

@ -14,21 +14,12 @@ class CementError(Exception):
def __str__(self):
return self.msg
class CementConfigError(CementError):
"""Cement configuration related errors."""
pass
class CementRuntimeError(CementError):
"""
General runtime errors. Similar to '500 Internal Server Error' in the
web world.
"""
pass
class CementArgumentError(CementError):
"""Command line argument related errors."""
pass
class CementInterfaceError(CementError):
"""Interface related errors."""

View File

@ -4,15 +4,6 @@ from cement.core import exc
from cement.utils import test
class ExceptionTestCase(test.CementTestCase):
@test.raises(exc.CementConfigError)
def test_cement_config_error(self):
try:
raise exc.CementConfigError("CementConfigError Test")
except exc.CementConfigError as e:
self.eq(e.msg, "CementConfigError Test")
self.eq(e.__str__(), "CementConfigError Test")
raise
@test.raises(exc.CementRuntimeError)
def test_cement_runtime_error(self):
try:
@ -22,15 +13,6 @@ class ExceptionTestCase(test.CementTestCase):
self.eq(e.__str__(), "CementRuntimeError Test")
raise
@test.raises(exc.CementArgumentError)
def test_cement_argument_error(self):
try:
raise exc.CementArgumentError("CementArgumentError Test")
except exc.CementArgumentError as e:
self.eq(e.msg, "CementArgumentError Test")
self.eq(e.__str__(), "CementArgumentError Test")
raise
@test.raises(exc.CementInterfaceError)
def test_cement_interface_error(self):
try: