-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
712740b
commit b07eeb5
Showing
3 changed files
with
92 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/// A wrapper around the errors that can occur during a transaction. | ||
public struct PostgresTransactionError: Error { | ||
|
||
/// The file in which the transaction was started | ||
public var file: String | ||
/// The line in which the transaction was started | ||
public var line: Int | ||
|
||
/// The error thrown when running the `BEGIN` query | ||
public var beginError: Error? | ||
/// The error thrown in the transaction closure | ||
public var closureError: Error? | ||
|
||
/// The error thrown while rolling the transaction back. If the ``closureError`` is set, | ||
/// but the ``rollbackError`` is empty, the rollback was successful. If the ``rollbackError`` | ||
/// is set, the rollback failed. | ||
public var rollbackError: Error? | ||
|
||
/// The error thrown while commiting the transaction. | ||
public var commitError: Error? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters