-
Notifications
You must be signed in to change notification settings - Fork 451
/
Copy patherrors.kt
33 lines (29 loc) · 997 Bytes
/
errors.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package arrow.optics.plugin.internals
val String.otherClassTypeErrorMessage
get() =
"""
|$this cannot be annotated with @optics
| ^
|Only data and sealed classes can be annotated with @optics""".trimMargin()
val String.lensErrorMessage
get() =
"""
|Cannot generate arrow.optics.Lens for $this
| ^
|arrow.optics.OpticsTarget.LENS is an invalid @optics argument for $this.
|It is only valid for data classes.
""".trimMargin()
val String.prismErrorMessage
get() =
"""
|Cannot generate arrow.optics.Prism for $this
| ^
|arrow.optics.OpticsTarget.PRISM is an invalid @optics argument for $this.
|It is only valid for sealed classes.
""".trimMargin()
val String.noCompanion
get() =
"""
|$this must declare a companion object
| ^
|A companion object is required for the generated optics""".trimMargin()