Skip to content

Commit a30cb67

Browse files
committed
Remove broken link to 'Error Types' in the API reference
1 parent 280c1dc commit a30cb67

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

docs/.vuepress/config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,6 @@ module.exports = {
132132
alias: '/api/events',
133133
collapsable: true,
134134
},
135-
{
136-
title: 'Error Types',
137-
collapsable: true,
138-
children: fs.readdirSync(path.join(__dirname, '../api/classes'))
139-
.filter((n) => n.match(/.*error\.md$/))
140-
.map(f => `/api/classes/${f}`)
141-
},
142135
],
143136
'/': [
144137
{

docs/api-template.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,3 @@ hfInstance.on('sheetAdded', handler);
5151

5252
const nameProvided = hfInstance.addSheet('MySheet3');
5353
```
54-
55-
#### Error Types
56-
This page is a list of errors thrown by the HyperFormula instance that may be thrown depending on the method used.
57-
58-
An example of how you can handle an error: adding a sheet which name is already taken:
59-
```javascript
60-
// variable used to carry the message for the user
61-
let messageUsedInUI;
62-
63-
// attempt to add a sheet
64-
try {
65-
hfInstance.addSheet('MySheet1');
66-
67-
// whoops! there is already a sheet named 'MySheet1'
68-
} catch (e) {
69-
70-
// notify the user that a sheet with an ID of 5 does not exist
71-
if (e instanceof SheetNameAlreadyTakenError) {
72-
messageUsedInUI = 'Sheet name already taken';
73-
}
74-
// a generic error message, just in case
75-
else {
76-
messageUsedInUI = 'Something went wrong';
77-
}
78-
}
79-
```

0 commit comments

Comments
 (0)