Rename
This commit is contained in:
1 parent
b86d90021c
commit
6c0757c91b
972 files changed
+6885
-7321
No files matched your search
@@ -0,0 +1,8 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
/**
|
||||
* 并发限制
|
||||
*/
|
||||
class ConcurrentException(msg: String, val waitTime: Int) : NoStackTraceException(msg)
|
||||
@@ -0,0 +1,6 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
/**
|
||||
* 内容为空
|
||||
*/
|
||||
class ContentEmptyException(msg: String) : NoStackTraceException(msg)
|
||||
@@ -0,0 +1,6 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
/**
|
||||
* 文件为空
|
||||
*/
|
||||
class EmptyFileException(msg: String) : NoStackTraceException(msg)
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
class InvalidBooksDirException(msg: String) : NoStackTraceException(msg)
|
||||
@@ -0,0 +1,6 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
import io.legato.kazusa.R
|
||||
import splitties.init.appCtx
|
||||
|
||||
class NoBooksDirException: NoStackTraceException(appCtx.getString(R.string.no_books_dir))
|
||||
@@ -0,0 +1,17 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
/**
|
||||
* 不记录错误堆栈的报错
|
||||
*/
|
||||
open class NoStackTraceException(msg: String) : Exception(msg) {
|
||||
|
||||
override fun fillInStackTrace(): Throwable {
|
||||
stackTrace = emptyStackTrace
|
||||
return this
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val emptyStackTrace = emptyArray<StackTraceElement>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
class RegexTimeoutException(msg: String) : NoStackTraceException(msg)
|
||||
@@ -0,0 +1,6 @@
|
||||
package io.legato.kazusa.exception
|
||||
|
||||
/**
|
||||
* 目录为空
|
||||
*/
|
||||
class TocEmptyException(msg: String) : NoStackTraceException(msg)
|
||||
Reference in new issue
Block a user