Robot Framework Integrated Development Environment (RIDE)
usererrorhandler.py
Go to the documentation of this file.
1
# Copyright 2008-2015 Nokia Networks
2
# Copyright 2016- Robot Framework Foundation
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
# http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
16
from
robotide.lib.robot.model
import
Tags
17
from
robotide.lib.robot.result
import
Keyword
as
KeywordResult
18
19
from
.arguments
import
ArgumentSpec
20
from
.statusreporter
import
StatusReporter
21
22
23
29
class
UserErrorHandler
():
30
31
36
def
__init__
(self, error, name, libname=None):
37
self.
name
name = name
38
self.
libname
libname = libname
39
self.
error
error = error
40
self.
arguments
arguments =
ArgumentSpec
()
41
self.
timeout
timeout =
''
42
self.
tags
tags =
Tags
()
43
44
@property
45
longname = property
46
47
def
longname
(self):
48
return
'%s.%s'
% (self.
libname
libname, self.
name
name)
if
self.
libname
libname
else
self.
name
name
49
50
@property
51
doc = property
52
53
def
doc
(self):
54
return
'*Creating keyword failed:* %s'
% self.
error
error
55
56
@property
57
shortdoc = property
58
59
def
shortdoc
(self):
60
return
self.
doc
doc
doc.splitlines()[0]
61
62
def
create_runner
(self, name):
63
return
self
64
65
def
run
(self, kw, context):
66
result = KeywordResult(kwname=self.
name
name,
67
libname=self.
libname
libname,
68
args=kw.args,
69
assign=kw.assign,
70
type=kw.type)
71
with
StatusReporter
(context, result):
72
raise
self.
error
error
73
74
dry_run = run
robotide.lib.robot.model.tags.Tags
Definition:
tags.py:21
robotide.lib.robot.running.arguments.argumentspec.ArgumentSpec
Definition:
argumentspec.py:26
robotide.lib.robot.running.statusreporter.StatusReporter
Definition:
statusreporter.py:21
robotide.lib.robot.running.usererrorhandler.UserErrorHandler
Created if creating handlers fail – running raises DataError.
Definition:
usererrorhandler.py:29
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.longname
longname
Definition:
usererrorhandler.py:45
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.arguments
arguments
Definition:
usererrorhandler.py:40
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.name
name
Definition:
usererrorhandler.py:37
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.libname
libname
Definition:
usererrorhandler.py:38
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.doc
def doc(self)
Definition:
usererrorhandler.py:53
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.__init__
def __init__(self, error, name, libname=None)
:param robot.errors.DataError error: Occurred error.
Definition:
usererrorhandler.py:36
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.error
error
Definition:
usererrorhandler.py:39
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.create_runner
def create_runner(self, name)
Definition:
usererrorhandler.py:62
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.tags
tags
Definition:
usererrorhandler.py:42
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.shortdoc
shortdoc
Definition:
usererrorhandler.py:57
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.doc
doc
Definition:
usererrorhandler.py:51
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.run
def run(self, kw, context)
Definition:
usererrorhandler.py:65
robotide.lib.robot.running.usererrorhandler.UserErrorHandler.timeout
timeout
Definition:
usererrorhandler.py:41
robotide.lib.robot.model
Definition:
__init__.py:1
robotide.lib.robot.result
Definition:
__init__.py:1
src
robotide
lib
robot
running
usererrorhandler.py
Generated by
1.9.1