-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [refactor] NetworkKit 에러 추가 및 개선 * [refactor] MusicKit 에러 추가 * [refactor] Encoder Error 추가 * [refactor] Decoder 에러 추가 * [refactor] AudioKit Error 추가 * [refactor] Repository Error 추가 * [refactor] Presentation Layer Error 추가 * [Refactor] 재사용성 및 가독성을 고려하여 enum을 struct로 변환 * [Refactor] #file의 절대경로가 아닌, 에러의 원천 파일명만 출력하도록 수정
- Loading branch information
1 parent
b5bea3c
commit f3694f2
Showing
40 changed files
with
534 additions
and
282 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,19 @@ | ||
import Foundation | ||
|
||
struct ASAudioErrors: LocalizedError { | ||
let type: ErrorType | ||
let reason: String | ||
let file: String | ||
let line: Int | ||
|
||
enum ErrorType { | ||
case analyze | ||
case startPlaying, getDuration | ||
case configureAudioSession | ||
case startRecording | ||
} | ||
|
||
var errorDescription: String? { | ||
return "[\(URL(fileURLWithPath: file).lastPathComponent):\(line)] \(type) 에러: \n\(reason)" | ||
} | ||
} |
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
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,16 @@ | ||
import Foundation | ||
|
||
struct ASDecoderErrors: LocalizedError { | ||
let type: ErrorType | ||
let reason: String | ||
let file: String | ||
let line: Int | ||
|
||
enum ErrorType { | ||
case decode | ||
} | ||
|
||
var errorDescription: String? { | ||
return "[\(URL(fileURLWithPath: file).lastPathComponent):\(line)] \(type) 에러: \n\(reason)" | ||
} | ||
} |
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,16 @@ | ||
import Foundation | ||
|
||
struct ASEncoderErrors: LocalizedError { | ||
let type: ErrorType | ||
let reason: String | ||
let file: String | ||
let line: Int | ||
|
||
enum ErrorType { | ||
case encode | ||
} | ||
|
||
var errorDescription: String? { | ||
return "[\(URL(fileURLWithPath: file).lastPathComponent):\(line)] \(type) 에러: \n\(reason)" | ||
} | ||
} |
Oops, something went wrong.