Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2019-2024 Alexander Medvednikov. All rights reserved.
|
||||
// Use of this source code is governed by an MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
module time
|
||||
|
||||
// TimeParseError represents a time parsing error.
|
||||
pub struct TimeParseError {
|
||||
Error
|
||||
code int
|
||||
message string
|
||||
}
|
||||
|
||||
// msg implements the `IError.msg()` method for `TimeParseError`.
|
||||
pub fn (err TimeParseError) msg() string {
|
||||
return 'Invalid time format code: ${err.code}, error: ${err.message}'
|
||||
}
|
||||
|
||||
fn error_invalid_time(code int, message string) IError {
|
||||
return TimeParseError{
|
||||
code: code
|
||||
message: message
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user