mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
24 lines
313 B
Go
24 lines
313 B
Go
package edcore
|
|
|
|
// Trivial utilities for the elvishscript API.
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/elves/elvish/util"
|
|
)
|
|
|
|
func throw(e error) {
|
|
util.Throw(e)
|
|
}
|
|
|
|
func maybeThrow(e error) {
|
|
if e != nil {
|
|
util.Throw(e)
|
|
}
|
|
}
|
|
|
|
func throwf(format string, args ...interface{}) {
|
|
util.Throw(fmt.Errorf(format, args...))
|
|
}
|