-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error handler. Default impl prints, as before, custom can for eg …
…log to sentry.
- Loading branch information
Jasper Blues
committed
Sep 28, 2021
1 parent
544f712
commit b80476d
Showing
4 changed files
with
81 additions
and
30 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,30 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// SYMBIOSE | ||
// Copyright 2020 Symbiose Inc | ||
// All Rights Reserved. | ||
// | ||
// NOTICE: This software is proprietary information. | ||
// Unauthorized use is prohibited. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
import Foundation | ||
|
||
public protocol ErrorHandler { | ||
|
||
func log(_ message: String) | ||
|
||
func flush() | ||
|
||
} | ||
|
||
class ConsoleErrorHandler : ErrorHandler { | ||
|
||
func log(_ message: String) { | ||
print(message) | ||
} | ||
|
||
func flush() {} | ||
|
||
} |
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