Skip to content

Commit

Permalink
feat(socket): improve indexeddb connection error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
falsandtru committed Mar 22, 2016
1 parent ca90681 commit 60292c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/layer/infrastructure/indexeddb/model/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,12 @@ function handleFromInitialState({database}: State.Initial, version: number = 0):
}
}
catch (err) {
void console.warn(err);
if (err instanceof DOMError || err instanceof DOMException) {
void console.warn(err);
}
else {
void console.error(err);
}
void clear();
void handleFromCrashState(new State.Crash(database, err));
}
Expand Down

0 comments on commit 60292c8

Please sign in to comment.