diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 97d221261..3cc52844b 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -15,13 +15,15 @@ kotlin { val createInfoKt by tasks.creating { doLast { - infoKtFile.writeText(""" + infoKtFile.writeText( + """ |package $tuPrologPackage | |object Info { | const val VERSION = "${rootProject.version}" |} - """.trimMargin()) + |""".trimMargin() + ) } outputs.file(infoKtFile) } @@ -32,4 +34,4 @@ kotlin { } } } -} \ No newline at end of file +} diff --git a/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/InvalidClauseException.kt b/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/InvalidClauseException.kt index bcbd7434b..3ccf6c8f3 100644 --- a/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/InvalidClauseException.kt +++ b/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/InvalidClauseException.kt @@ -3,9 +3,9 @@ package it.unibo.tuprolog.core.exception import it.unibo.tuprolog.core.Term import kotlin.jvm.JvmOverloads -open class InvalidClauseException -@JvmOverloads -constructor(val term: Term, cause: Throwable? = null) : TuPrologException(cause) { +open class InvalidClauseException @JvmOverloads constructor(val term: Term, cause: Throwable? = null) : + TuPrologException(cause) { + override val message: String? get() = "Term `$term` is not a valid clause" } diff --git a/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/TuPrologException.kt b/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/TuPrologException.kt index 77c5fbf8e..9a9717140 100644 --- a/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/TuPrologException.kt +++ b/core/src/commonMain/kotlin/it/unibo/tuprolog/core/exception/TuPrologException.kt @@ -8,8 +8,7 @@ import kotlin.jvm.JvmOverloads * @param message the detail message string. * @param cause the cause of this exception. */ -open class TuPrologException -@JvmOverloads constructor( +open class TuPrologException @JvmOverloads constructor( override val message: String? = null, override val cause: Throwable? = null ) : RuntimeException(message, cause) { diff --git a/serialize-core/src/commonMain/kotlin/it/unibo/tuprolog/serialize/Objectifier.kt b/serialize-core/src/commonMain/kotlin/it/unibo/tuprolog/serialize/Objectifier.kt index 1c71e96ef..6c0d73000 100644 --- a/serialize-core/src/commonMain/kotlin/it/unibo/tuprolog/serialize/Objectifier.kt +++ b/serialize-core/src/commonMain/kotlin/it/unibo/tuprolog/serialize/Objectifier.kt @@ -16,4 +16,5 @@ interface Objectifier { @JsName("objectifyManySequence") fun objectifyMany(values: Sequence): Any = objectifyMany(values.asIterable()) -} \ No newline at end of file +} +