Skip to content

Commit

Permalink
Advertise change to default behavior of IModelDb.close() (#673)
Browse files Browse the repository at this point in the history
* change to default behavior of IModelDb.close() and IModelDb.saveChanges()

Co-authored-by: Affan Khan <khanaffan@users.noreply.github.com>
  • Loading branch information
khanaffan and khanaffan authored Jan 29, 2021
1 parent 5cdaa44 commit b078178
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/changehistory/NextVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ This feature is currently disabled by default. Enabling it requires the use of A
IModelApp.startup({ tileAdmin });
```

## Changes to [IModelDb.close]($backend) and [IModelDb.saveChanges]($backend)

Previously, [IModelDb.close]($backend) would save any uncommitted changes to disk before closing the iModel. It no longer does so - instead, if uncommitted changes exist when the iModel is closed, they will be discarded. Applications should explicitly call either [IModelDb.saveChanges]($backend) to commit the changes or [IModelDb.abandonChanges]($backend) to discard them before calling `close`.

In rare circumstances, [IModelDb.saveChanges]($backend) may now throw an exception. This indicates a fatal condition like exhaustion of memory or disk space. Applications should wrap calls to `saveChanges` in a `try-catch` block and handle exceptions by terminating without making further use of the iModel. In particular, they should not attempt to call `close`, `saveChanges`, or `abandonChanges` after such an exception has occurred.

## Breaking API Changes

### Electron Initialization
Expand Down

0 comments on commit b078178

Please sign in to comment.