aboutsummaryrefslogtreecommitdiff
path: root/cmd/vartan/compile.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/vartan/compile.go')
-rw-r--r--cmd/vartan/compile.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/cmd/vartan/compile.go b/cmd/vartan/compile.go
index 70d01b2..e2b5f56 100644
--- a/cmd/vartan/compile.go
+++ b/cmd/vartan/compile.go
@@ -6,7 +6,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
- "runtime/debug"
"strings"
verr "github.com/nihei9/vartan/error"
@@ -47,20 +46,6 @@ func runCompile(cmd *cobra.Command, args []string) (retErr error) {
grmPath = args[0]
}
defer func() {
- panicked := false
- v := recover()
- if v != nil {
- err, ok := v.(error)
- if !ok {
- retErr = fmt.Errorf("an unexpected error occurred: %v", v)
- fmt.Fprintf(os.Stderr, "%v:\n%v", retErr, string(debug.Stack()))
- return
- }
-
- retErr = err
- panicked = true
- }
-
if retErr != nil {
specErrs, ok := retErr.(verr.SpecErrors)
if ok {
@@ -74,12 +59,6 @@ func runCompile(cmd *cobra.Command, args []string) (retErr error) {
}
}
}
-
- if panicked {
- fmt.Fprintf(os.Stderr, "%v:\n%v", retErr, string(debug.Stack()))
- } else {
- fmt.Fprintf(os.Stderr, "%v\n", retErr)
- }
}
}()