mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Make "no adapter" error message friendlier.
In the very common case, there are no JsonQualifier annotations for the type.
This commit is contained in:
@@ -159,7 +159,7 @@ class KotlinCodeGenTest {
|
||||
moshi.adapter(Triple::class.java)
|
||||
fail()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
assertThat(e).hasMessage("Platform class kotlin.Triple annotated [] "
|
||||
assertThat(e).hasMessage("Platform class kotlin.Triple (with no annotations) "
|
||||
+ "requires explicit JsonAdapter to be registered")
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ class KotlinCodeGenTest {
|
||||
fail()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
assertThat(e).hasMessage("No JsonAdapter for interface " +
|
||||
"com.squareup.moshi.KotlinJsonAdapterTest\$Interface annotated []")
|
||||
"com.squareup.moshi.KotlinJsonAdapterTest\$Interface (with no annotations)")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user