comparison src/main/kotlin/name/blackcap/passman/Subcommand.kt @ 21:ea65ab890f66

More work to support interactive feature.
author David Barts <n5jrn@me.com>
date Tue, 02 Jul 2024 11:27:39 -0700
parents a6cfdffcaa94
children
comparison
equal deleted inserted replaced
20:4391afcf6bd0 21:ea65ab890f66
1 package name.blackcap.passman 1 package name.blackcap.passman
2 2
3 abstract class Subcommand() { 3 abstract class Subcommand() {
4 abstract fun run(args: Array<String>): Unit 4 abstract fun run(args: Array<String>): Unit
5 } 5 }
6
7 // Replaces fatal errors that used to exit the process.
8 class SubcommandException(message: String? = null, cause: Throwable? = null, status: Int = 1) : Exception(message, cause) {
9 private val _status = status
10 val status: Int
11 get() = _status
12 }