Skip to content

Commit

Permalink
0x00 : 1,2,3 - General errors: badparams, unknown, cancelled, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
joedf committed Aug 19, 2015
1 parent 02e46b4 commit f31a291
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Ahk2Exe.ahk
Expand Up @@ -154,7 +154,7 @@ IfNotExist, %A_ScriptDir%\AutoHotkeySC.bin
)
IfMsgBox, Yes
return
ExitApp
ExitApp, 0x2 ; Compilation cancelled
}
FileDelete, %A_ScriptDir%\___.tmp

Expand Down Expand Up @@ -187,7 +187,7 @@ IfNotExist, %A_ScriptDir%\AutoHotkeySC.bin
)
IfMsgBox, Yes
return
ExitApp
ExitApp, 0x2 ; Compilation cancelled
}

FileCopy, %binFile%, %A_ScriptDir%\AutoHotkeySC.bin
Expand Down Expand Up @@ -258,7 +258,7 @@ return

BadParams:
Util_Info("Command Line Parameters:`n`n" A_ScriptName " /in infile.ahk [/out outfile.exe] [/icon iconfile.ico] [/bin AutoHotkeySC.bin] [/mpress 1 (true) or 0 (false)]")
ExitApp
ExitApp, 0x3

_ProcessIn:
AhkFile := p2
Expand Down Expand Up @@ -468,7 +468,7 @@ Util_ErrorCode(x)
if InStr(x,"icon")
return 0x42

return -1 ;unknown error
return 0x1 ;unknown error
}

Util_Info(txt)
Expand Down
8 changes: 8 additions & 0 deletions ErrorCodes.md
@@ -1,6 +1,14 @@
Possible Errors
=========================================

### `(0x00+)` General

- `(0x0)` Compilation was successful.
- `(0x1)` Error: Unknown error.
- `(0x2)` Compilation was cancelled.
- `(0x3)` Error: Bad parameters


### `(0x10+)` Syntax

- `(0x1)` Error: The script contains syntax errors.
Expand Down

0 comments on commit f31a291

Please sign in to comment.