mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
24 lines
428 B
Go
24 lines
428 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type ArErr struct {
|
|
TYPE string
|
|
message string
|
|
line int
|
|
path string
|
|
code string
|
|
EXISTS bool
|
|
}
|
|
|
|
func panicErr(err ArErr) {
|
|
if err.code != "" && err.line != 0 && err.path != "" {
|
|
fmt.Println(" File:", err.path+":"+fmt.Sprint(err.line))
|
|
fmt.Println(" " + err.code)
|
|
fmt.Println()
|
|
}
|
|
fmt.Printf("\x1b[%dm%s\x1b[0m", 91, fmt.Sprint(err.TYPE, ": ", err.message, "\n"))
|
|
}
|