Skip to content
Snippets Groups Projects
Commit fea673fe authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Use the construct Raises.

parent 259d3f36
No related branches found
No related tags found
No related merge requests found
...@@ -821,7 +821,8 @@ def to_panelWithUrlSelector(table, selectorTitle='Select', **kwargs): ...@@ -821,7 +821,8 @@ def to_panelWithUrlSelector(table, selectorTitle='Select', **kwargs):
Returns: Returns:
PanelWithUrlSelector: PanelWithUrlSelector:
:raise BaseException: when baseUrl is not defined. Raises:
BaseException: when the argument``baseUrl`` is not defined.
""" """
if 'baseUrl' not in kwargs: if 'baseUrl' not in kwargs:
......
...@@ -109,9 +109,10 @@ class DbSvc(BaseSvc): ...@@ -109,9 +109,10 @@ class DbSvc(BaseSvc):
keywords (dict): keywords (dict):
list of keys which have to be in the ``arg`` dictionary list of keys which have to be in the ``arg`` dictionary
:raise DbSvcException: Raises:
when a keyword is missing or when the table DbSvcException:
does not exist in the database. when a keyword is missing or when the table
does not exist in the database.
""" """
# check that the request is well formed # check that the request is well formed
...@@ -280,7 +281,8 @@ class DbSvc(BaseSvc): ...@@ -280,7 +281,8 @@ class DbSvc(BaseSvc):
Args: Args:
tablename (str): name of the database table tablename (str): name of the database table
:raise DbSvcException: when the table does not exists Raises:
DbSvcException: when the database table does not exists
..note:: ..note::
The method works with regular and alias tables. The method works with regular and alias tables.
......
...@@ -86,9 +86,10 @@ class DirectSvc(BaseSvc): ...@@ -86,9 +86,10 @@ class DirectSvc(BaseSvc):
on the server side on the server side
* the response is encoded as a JSON string. * the response is encoded as a JSON string.
:raise gluon.http.HTTP: Raises:
when the request has no arguments gluon.http.HTTP:
or when the function / method crashed. when the request has no arguments
or when the function / method crashed.
""" """
self.dbg('Start directSvc.call') self.dbg('Start directSvc.call')
...@@ -115,7 +116,8 @@ class DirectSvc(BaseSvc): ...@@ -115,7 +116,8 @@ class DirectSvc(BaseSvc):
code (int): code of the HTTP error code (int): code of the HTTP error
message (str): explanation for the HTTP error message (str): explanation for the HTTP error
:raise gluon.http.HTTP: Raises:
gluon.http.HTTP:
""" """
raise HTTP(code, message) raise HTTP(code, message)
...@@ -162,10 +164,11 @@ class DirectSvc(BaseSvc): ...@@ -162,10 +164,11 @@ class DirectSvc(BaseSvc):
the response of the function / method the response of the function / method
encoded as a JSON string. encoded as a JSON string.
:raise gluon.http.HTTP: Raises:
with the code 500 when the execution of the gluon.http.HTTP:
function / method crash. The python trace back is stored with the code 500 when the execution of the
in the web2py ticket system. function / method crash. The python trace back is stored
in the web2py ticket system.
""" """
self.dbg('Start directSvc.route') self.dbg('Start directSvc.route')
......
...@@ -32,8 +32,9 @@ class Base(Storage): ...@@ -32,8 +32,9 @@ class Base(Storage):
kwargs (dict): kwargs (dict):
any Ext JS configuration parameter of the target class any Ext JS configuration parameter of the target class
:raise ExtJSException: Raises:
if the keyword ``xtype`` is in the keyword arguments. ExtJSException:
when the keyword ``xtype`` is in the keyword arguments.
""" """
if 'xtype' in kwargs: if 'xtype' in kwargs:
......
...@@ -61,9 +61,10 @@ class ViewportModifier(Modifier): ...@@ -61,9 +61,10 @@ class ViewportModifier(Modifier):
Elements of the list equal to ``None`` are ignored. Elements of the list equal to ``None`` are ignored.
This feature is useful when the list of nodes depend on user role. This feature is useful when the list of nodes depend on user role.
:raise ViewportModifierException: Raises:
at least one element of the list ViewportModifierException:
is not a ``Node`` or ``None``. at least one element of the list
is not a ``Node`` or ``None``.
""" """
li = [] li = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment