• R/O
  • HTTP
  • SSH
  • HTTPS

bashutil: Commit

BashUtil のためのリポジトリです。


Commit MetaInfo

Revision1dfb2c62dcf522855653b89277487928d3768486 (tree)
Time2014-02-06 22:16:23
Authoriga <tosiki.iga@nift...>
Commiteriga

Log Message

Improve check.

Change Summary

Incremental Difference

--- a/main/bumsg.fnc
+++ b/main/bumsg.fnc
@@ -61,6 +61,12 @@ LOGGER="/usr/bin/logger -t $0 -i"
6161 # @param ${11} argument 10
6262 logmsg() {
6363 local msgid="$1"
64+
65+ if [ ${#msgid} = 0 ]; then
66+ echo "[bumsg.fnc#logmsg][error]Illegal argument: message id must be specified." 1>&2
67+ return 101
68+ fi
69+
6470 local strmsg="`getmsg \"$1\" \"$2\" \"$3\" \"$4\" \"$5\" \"$6\" \"$7\" \"$8\" \"$9\" \"${10}\" \"${11}\"`"
6571
6672 ismsgEnvSysout "${msgid}"
@@ -113,7 +119,7 @@ getmsg() {
113119
114120 if [ ${#msgid} = 0 ]; then
115121 echo "[bumsg.fnc#getmsg][error]Illegal argument: message id must be specified." 1>&2
116- return 1
122+ return 101
117123 fi
118124
119125 local msgtextkey="`getmsgIdEnvKey ${msgid}`"
@@ -121,7 +127,7 @@ getmsg() {
121127
122128 if [ ${#msgtextkeyString} = 0 ]; then
123129 echo "[bumsg.fnc#getmsg][error]Message not found for ${msgtextkey}" 1>&2
124- return 2
130+ return 102
125131 fi
126132
127133 local printfString=""
Show on old repository browser