Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions tmpl/exceptions.tmpl
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<?js
var data = obj;
var exceptions = obj;
var self = this;
?>
<?js if (data.description && data.type && data.type.names) { ?>
<dl>
<dt>
<div class="param-desc">
<?js= data.description ?>
</div>
</dt>
<dt>
<dl>
<dt>
Type
</dt>
<dd>
<?js= this.partial('type.tmpl', data.type.names) ?>
</dd>
</dl>
</dt>
</dl>
<?js } else { ?>
<div class="param-desc">
<?js if (data.description) { ?>
<?js= data.description ?>
<?js } else if (data.type && data.type.names) { ?>
<?js= this.partial('type.tmpl', data.type.names) ?>
<?js } ?>
</div>
<?js } ?>

<table class="params">
<thead>
<tr>
<th>Type</th>
<th class="last">When</th>
</tr>
</thead>
<tbody>

<?js exceptions.forEach(function(exception) { ?>
<tr>
<td class="type">
<?js if (exception.type && exception.type.names) {?>
<?js= self.partial('type.tmpl', exception.type.names) ?>
<?js } ?>
</td>
<td class="description last">
<?js if (exception.description) { ?>
<?js= exception.description ?>
<?js } ?>
</td>
</tr>
<?js }); ?>

</tbody>
</table>
11 changes: 2 additions & 9 deletions tmpl/method.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,8 @@ var self = this;

<?js if (data.exceptions && exceptions.length) { ?>
<h5>Throws:</h5>
<?js if (exceptions.length > 1) { ?><ul><?js
exceptions.forEach(function(r) { ?>
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
<?js });
?></ul><?js } else {
exceptions.forEach(function(r) { ?>
<?js= self.partial('exceptions.tmpl', r) ?>
<?js });
} } ?>
<?js= this.partial('exceptions.tmpl', exceptions) ?>
<?js }?>

<?js if (data.returns && returns.length) { ?>
<?js if (returns.length > 1) { ?><h5>Returns:</h5><?js } ?>
Expand Down