Chinaunix首页 | 论坛 | 博客
  • 博客访问: 19912687
  • 博文数量: 679
  • 博客积分: 10495
  • 博客等级: 上将
  • 技术积分: 9308
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-18 10:51
文章分类

全部博文(679)

文章存档

2012年(5)

2011年(38)

2010年(86)

2009年(145)

2008年(170)

2007年(165)

2006年(89)

分类: Python/Ruby

2010-02-06 21:45:44

#  Copyright 2008-2009 Nokia Siemens Networks Oyj
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#     
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


# Return codes from Robot and Rebot.
# RC below 250 is the number of failed critical tests and exactly 250
# means that number or more such failures.
INFO_PRINTED    = 251   # --help or --version
DATA_ERROR      = 252   # Invalid data or cli args
STOPPED_BY_USER = 253   # KeyboardInterrupt or SystemExit
FRAMEWORK_ERROR = 255   # Unexpected error


class RobotError(Exception):
    """Base class for Robot errors
    
    Do not raise this method but use more specific errors instead.
    """

class FrameworkError(RobotError):
    """Can be used when the core framework goes to unexpected state

    It is good to explicitely raise a FrameworkError if some framework
    component is used incorrectly. This is pretty much same as
    'Internal Error' and should of course never happen.
    """
    
class DataError(RobotError):
    """Should be used when provided test data is incorrect"""

class ExecutionFailed(RobotError):
    """Used for cummunicating failures in test execution"""
    
class TimeoutError(RobotError):
    """Used when test execution is timed out"""

class RemoteError(RobotError):
    """Used by Remote library to report remote errors"""
    def __init__(self, message, traceback):
        RobotError.__init__(self, message)
        self.traceback = traceback

class Information(RobotError):
    """Used by argument parser with --help or --version"""


文件路径:C:\Python26\lib\site-packages\robot\errors.py
功能:各种错误子类的定义
阅读(21244) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~