Skip to content

Commit

Permalink
(feat) subclassing exceptions to group them up
Browse files Browse the repository at this point in the history
  • Loading branch information
Judas committed Nov 17, 2023
1 parent ac76f3f commit 0f42a2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.judas.sgf4k.feature.exceptions

class InvalidGameException(reason: String) : Exception("Invalid game: $reason")
class InvalidGameException(reason: String) : Sgf4kRuntimeException("Invalid game: $reason")
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.judas.sgf4k.feature.exceptions

class InvalidGameNodeException(reason: String) : Exception("Invalid game node: $reason")
class InvalidGameNodeException(reason: String) : Sgf4kRuntimeException("Invalid game node: $reason")
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.judas.sgf4k.feature.exceptions

class InvalidSgfException(reason: String) : Exception("Invalid SGF file: $reason")
class InvalidSgfException(reason: String) : Sgf4kRuntimeException("Invalid SGF file: $reason")
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.judas.sgf4k.feature.exceptions

class Sgf4kRuntimeException(reason: String) : Exception("Error while processing: $reason")
open class Sgf4kRuntimeException(reason: String) : Exception("Error while processing: $reason")

0 comments on commit 0f42a2c

Please sign in to comment.