Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

异常类

class EnvException

public class EnvException <: Exception {
    public init(message: String)
}

功能:env 包的异常类。

父类型:

init(String)

public init(message: String)

功能:创建 EnvException 实例。

参数:

  • message: String - 异常提示信息。

示例:

import std.env.*

main() {
    // 使用带消息的构造函数创建EnvException实例
    let exception = EnvException("自定义异常信息")
}