-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseTransactionError.swift
More file actions
37 lines (35 loc) · 1.18 KB
/
DatabaseTransactionError.swift
File metadata and controls
37 lines (35 loc) · 1.18 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
//
// DatabaseTransactionError.swift
// feather-database
//
// Created by Tibor Bödecs on 2026. 02. 01..
//
/// A transaction error that captures failure details.
///
/// Use this protocol to report errors from transaction phases.
public protocol DatabaseTransactionError: Error {
/// The source file where the transaction error was created.
///
/// This is typically populated using `#fileID`.
var file: String { get }
/// The source line where the transaction error was created.
///
/// This is typically populated using `#line`.
var line: Int { get }
/// The error thrown while beginning the transaction.
///
/// This is set when the begin step fails.
var beginError: Error? { get }
/// The error thrown inside the transaction closure.
///
/// This is set when the closure fails before commit.
var closureError: Error? { get }
/// The error thrown while committing the transaction.
///
/// This is set when the commit step fails.
var commitError: Error? { get }
/// The error thrown while rolling back the transaction.
///
/// This is set when the rollback step fails.
var rollbackError: Error? { get }
}