Skip to content

Commit c920d04

Browse files
Add more logs
1 parent 58e2652 commit c920d04

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

convertible-core/src/main/kotlin/pro/vlprojects/convertible/core/processor/ConvertibleProcessor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class ConvertibleProcessor(
3939
}
4040

4141
override fun finish() = definitions
42+
.also { logger.info("${it.size} definitions found for code generating") }
4243
.forEach { definition ->
4344
val targetPackage = "${definition.objectClassName.packageName}.${definition.scope.lowercase()}"
4445
strategies

convertible-core/src/main/kotlin/pro/vlprojects/convertible/core/processor/ConvertibleVisitor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ConvertibleVisitor(
3030
.filter { it.isOf(Convertible::class) }
3131
.toList()
3232

33-
if (convertibles.isEmpty()) return
33+
check(convertibles.isNotEmpty()) { "No @Convertible annotations on class $className" }
3434

3535
convertibles.forEach { annotation ->
3636
val nullable = annotation.getArgument<Boolean>("nullable").let(::checkNotNull)

0 commit comments

Comments
 (0)