mirror of
https://github.com/datafolklabs/cement.git
synced 2026-02-06 13:42:03 +00:00
Resolves Issue #155
This commit is contained in:
parent
2b294739d9
commit
560737554a
@ -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
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@ -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."""
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user