forked from TrueCloudLab/neoneo-go
compiler: fix unhandled error
This commit is contained in:
parent
66b6a27b09
commit
dc5da4f37e
1 changed files with 4 additions and 1 deletions
|
@ -109,9 +109,12 @@ func CompileAndSave(src string, o *Options) ([]byte, error) {
|
|||
}
|
||||
out := fmt.Sprintf("%s.%s", o.Outfile, o.Ext)
|
||||
err = ioutil.WriteFile(out, bytes, os.ModePerm)
|
||||
if o.DebugInfo == "" {
|
||||
if err != nil {
|
||||
return b, err
|
||||
}
|
||||
if o.DebugInfo == "" {
|
||||
return b, nil
|
||||
}
|
||||
p, err := filepath.Abs(src)
|
||||
if err != nil {
|
||||
return b, err
|
||||
|
|
Loading…
Reference in a new issue