Robot Framework Integrated Development Environment (RIDE)
__init__.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 
23 
24 from robotide.lib.robot.errors import DataError
25 from robotide.lib.robot.utils import get_error_message
26 
27 from .builder import DocumentationBuilder
28 from .consoleviewer import ConsoleViewer
29 
30 
31 def LibraryDocumentation(library_or_resource, name=None, version=None,
32  doc_format=None):
33  builder = DocumentationBuilder(library_or_resource)
34  try:
35  libdoc = builder.build(library_or_resource)
36  except DataError:
37  raise
38  except:
39  raise DataError("Building library '%s' failed: %s"
40  % (library_or_resource, get_error_message()))
41  if name:
42  libdoc.name = name
43  if version:
44  libdoc.version = version
45  if doc_format:
46  libdoc.doc_format = doc_format
47  return libdoc
Used when variable does not exist.
Definition: errors.py:67
def DocumentationBuilder(library_or_resource)
Definition: builder.py:37
def LibraryDocumentation(library_or_resource, name=None, version=None, doc_format=None)
Definition: __init__.py:32
def get_error_message()
Returns error message of the last occurred exception.
Definition: error.py:41