-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e02f11f
commit 89af657
Showing
7 changed files
with
111 additions
and
32 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/main/scala/com.snowplowanalytics.snowplow.analytics.scalasdk/ParsingError.scala
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,36 @@ | ||
package com.snowplowanalytics.snowplow.analytics.scalasdk | ||
|
||
/** | ||
* Represents error during parsing TSV event | ||
*/ | ||
sealed trait ParsingError | ||
|
||
object ParsingError { | ||
|
||
/** | ||
* Represents error which given line is not a TSV | ||
*/ | ||
case object NonTSVPayload extends ParsingError | ||
|
||
/** | ||
* Represents error which number of given columns is not equal | ||
* to number of expected columns | ||
* @param expectedNum expected number of columns | ||
* @param gotNum number of given columns | ||
*/ | ||
case class ColumnNumberMismatch(expectedNum: Int, gotNum: Int) extends ParsingError | ||
|
||
/** | ||
* Represents cases where value in a field is not valid | ||
* e.g invalid timestamp, invalid UUID | ||
* @param key key of field | ||
* @param value value of the field | ||
*/ | ||
case class InvalidValue(key: String, value: String) extends ParsingError | ||
|
||
/** | ||
* Represents unexpected errors | ||
* @param error error message | ||
*/ | ||
case class UnexpectedError(error: String) extends ParsingError | ||
} |
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
Oops, something went wrong.