freemarker 0.1.1

Apache FreeMarker 语义兼容的 Rust 模板引擎(freemarker-core 迁移)
Documentation
//! 未知时区异常 —— 对应 Java
//! `freemarker.template.utility.UnrecognizedTimeZoneException`
//! (时区 ID 无法解析)

use std::fmt;

/// 未知时区异常(对应 UnrecognizedTimeZoneException.java)
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct UnrecognizedTimeZoneException {
    pub time_zone_id: String,
}

impl fmt::Display for UnrecognizedTimeZoneException {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(
            f,
            "Unrecognized time zone: {} (FreeMarker doesn't recognize it)",
            self.time_zone_id
        )
    }
}

impl std::error::Error for UnrecognizedTimeZoneException {}