-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup and add descriptions to Turbo load errors
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
11 changes: 9 additions & 2 deletions
11
turbo/src/main/kotlin/dev/hotwire/turbo/errors/LoadError.kt
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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
package dev.hotwire.turbo.errors | ||
|
||
sealed interface LoadError : TurboVisitError { | ||
data object NotPresent : LoadError | ||
data object NotReady : LoadError | ||
val description: String | ||
|
||
data object NotPresent : LoadError { | ||
override val description = "Turbo Not Present" | ||
} | ||
|
||
data object NotReady : LoadError { | ||
override val description = "Turbo Not Ready" | ||
} | ||
} |
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