-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseTransactionErrorSQLite.swift
More file actions
44 lines (38 loc) · 1.42 KB
/
DatabaseTransactionErrorSQLite.swift
File metadata and controls
44 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// DatabaseTransactionErrorSQLite.swift
// feather-database-sqlite
//
// Created by Tibor Bödecs on 2026. 01. 10.
//
import FeatherDatabase
import SQLiteNIOExtras
/// Transaction error details for SQLite operations.
///
/// Use this to capture errors from transaction phases.
public struct DatabaseTransactionErrorSQLite: DatabaseTransactionError {
var underlyingError: SQLiteTransactionError
/// The source file where the error was created.
///
/// This is captured with `#fileID` by default.
public var file: String { underlyingError.file }
/// The source line where the error was created.
///
/// This is captured with `#line` by default.
public var line: Int { underlyingError.line }
/// The error thrown while beginning the transaction.
///
/// Set when the `BEGIN` step fails.
public var beginError: Error? { underlyingError.beginError }
/// The error thrown inside the transaction closure.
///
/// Set when the closure fails before commit.
public var closureError: Error? { underlyingError.closureError }
/// The error thrown while committing the transaction.
///
/// Set when the `COMMIT` step fails.
public var commitError: Error? { underlyingError.commitError }
/// The error thrown while rolling back the transaction.
///
/// Set when the `ROLLBACK` step fails.
public var rollbackError: Error? { underlyingError.rollbackError }
}