-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1797 from ardriveapp/PE-6464-could-not-roll-back-…
…exception-could-not-roll-back-exception-error-bad-parameter-or-other-api-misuse PE-6464: enhance error handling and logging
- Loading branch information
Showing
7 changed files
with
206 additions
and
39 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
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,11 @@ | ||
class DriveDAOException implements Exception { | ||
final String message; | ||
final Object? error; | ||
|
||
DriveDAOException({required this.message, this.error}); | ||
|
||
@override | ||
String toString() { | ||
return 'DriveDAOException: $message. Error: ${error.toString()}'; | ||
} | ||
} |
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
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,37 @@ | ||
class ArDriveContext { | ||
ArDriveContext({ | ||
this.userAddress, | ||
this.numberOfDrives, | ||
this.numberOfFiles, | ||
this.numberOfFolders, | ||
}); | ||
|
||
final String? userAddress; | ||
|
||
final int? numberOfDrives; | ||
final int? numberOfFiles; | ||
final int? numberOfFolders; | ||
|
||
// TODO: Add more context variables | ||
// final bool? isArconnect; | ||
// final bool? isMetamask; | ||
|
||
ArDriveContext copyWith({ | ||
String? userAddress, | ||
int? numberOfDrives, | ||
int? numberOfFiles, | ||
int? numberOfFolders, | ||
}) { | ||
return ArDriveContext( | ||
userAddress: userAddress ?? this.userAddress, | ||
numberOfDrives: numberOfDrives ?? this.numberOfDrives, | ||
numberOfFiles: numberOfFiles ?? this.numberOfFiles, | ||
numberOfFolders: numberOfFolders ?? this.numberOfFolders, | ||
); | ||
} | ||
|
||
@override | ||
String toString() { | ||
return 'ArDriveContext(userAddress: $userAddress, numberOfDrives: $numberOfDrives, numberOfFiles: $numberOfFiles, numberOfFolders: $numberOfFolders)'; | ||
} | ||
} |
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