Ignore:
Timestamp:
Nov 11, 2008, 3:50:12 AM (15 years ago)
Author:
broder
Message:

Move CodeError? and InvalidInput? into invirt.common

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/webcommon.py

    r1318 r1612  
    44from invirt import database
    55from invirt.database import Machine, MachineAccess
    6 
    7 class MyException(Exception):
    8     """Base class for my exceptions"""
    9     pass
    10 
    11 class InvalidInput(MyException):
    12     """Exception for user-provided input is invalid but maybe in good faith.
    13 
    14     This would include setting memory to negative (which might be a
    15     typo) but not setting an invalid boot CD (which requires bypassing
    16     the select box).
    17     """
    18     def __init__(self, err_field, err_value, expl=None):
    19         MyException.__init__(self, expl)
    20         self.err_field = err_field
    21         self.err_value = err_value
    22 
    23 class CodeError(MyException):
    24     """Exception for internal errors or bad faith input."""
    25     pass
    266
    277import controls
Note: See TracChangeset for help on using the changeset viewer.