Skip to content

Commit a26cfee

Browse files
anarchuserxeruf
authored andcommitted
refactor(sdk): make the InvalidMoveException reason algo more legible
1 parent f6a804d commit a26cfee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

socha-sdk/src/framework/sc/shared/InvalidMoveException.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import kotlin.RuntimeException
66
/** NOTE: It is important to have information about the move in the reason
77
* because that is the only place where the invalid move is logged */
88
class InvalidMoveException @JvmOverloads constructor(reason: String, @JvmField val move: IMove? = null):
9-
RuntimeException(reason + (if (move != null) "; move was $move" else ""))
9+
RuntimeException(reason + move?.let { "; move was $it"}.orEmpty())

0 commit comments

Comments
 (0)