Skip to content

Commit

Permalink
RdFault: add @nls annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Jun 17, 2021
1 parent ff15a4d commit b4e62ba
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ open class MultiplatformPlugin : Plugin<Project> {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
// implementation("org.jetbrains:annotations:20.1.0")
}
}
val jvmTest by getting {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.jetbrains.rd.util.reactive

import com.jetbrains.rd.util.ExecutionException
import com.jetbrains.rd.util.getThrowableText

expect class RdFault constructor(reasonTypeFqn: String, reasonMessage: String, reasonAsText: String, reason: Throwable? = null) :
ExecutionException {
val reasonTypeFqn: String
val reasonMessage: String
val reasonAsText: String

class RdFault constructor(val reasonTypeFqn: String, val reasonMessage: String, val reasonAsText: String, reason: Throwable? = null)
: ExecutionException(reasonMessage + if (reason == null) ", reason: $reasonAsText" else "", reason) {

constructor (reason: Throwable) : this (reason::class.simpleName?:"", reason.message ?: "-- no message --", reason.getThrowableText(), reason) {
}
constructor(reason: Throwable)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.jetbrains.rd.util.reactive

import com.jetbrains.rd.util.ExecutionException
import com.jetbrains.rd.util.getThrowableText

actual class RdFault actual constructor(
actual val reasonTypeFqn: String,
actual val reasonMessage: String,
actual val reasonAsText: String,
reason: Throwable?
) : ExecutionException(reasonMessage + if (reason == null) ", reason: $reasonAsText" else "", reason) {

actual constructor (reason: Throwable) : this (reason::class.simpleName?:"", reason.message ?: "-- no message --", reason.getThrowableText(), reason) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.jetbrains.rd.util.reactive

import com.jetbrains.rd.util.ExecutionException
import com.jetbrains.rd.util.getThrowableText
import org.jetbrains.annotations.Nls

actual class RdFault actual constructor(
actual val reasonTypeFqn: String,
@Nls actual val reasonMessage: String,
@Nls actual val reasonAsText: String,
reason: Throwable?
) : ExecutionException(reasonMessage + if (reason == null) ", reason: $reasonAsText" else "", reason) {

actual constructor (reason: Throwable) : this (reason::class.simpleName?:"", reason.message ?: "-- no message --", reason.getThrowableText(), reason) {
}
}

0 comments on commit b4e62ba

Please sign in to comment.