summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 02:45:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 02:45:23 +0000
commit88d5dcc8de20a613d35827198a30010e7ed4279b (patch)
tree7e5d3b3352dbd38446002315e32d41f271167573 /ext
parentba32fdd167304025106d9d79eb12388b29a4b1e6 (diff)
downloadruby-88d5dcc8de20a613d35827198a30010e7ed4279b.tar.gz
* exception error messages updated. [ruby-core:04497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/Win32API/Win32API.c2
-rw-r--r--ext/bigdecimal/bigdecimal.c14
-rw-r--r--ext/curses/curses.c2
-rw-r--r--ext/dl/handle.c6
-rw-r--r--ext/openssl/ossl_cipher.c4
-rw-r--r--ext/pty/pty.c4
-rw-r--r--ext/readline/readline.c6
-rw-r--r--ext/socket/socket.c8
-rw-r--r--ext/strscan/strscan.c4
-rw-r--r--ext/win32ole/win32ole.c106
-rw-r--r--ext/zlib/zlib.c4
11 files changed, 80 insertions, 80 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 776df56ecb..be07b8504f 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -160,7 +160,7 @@ Win32API_Call(argc, argv, obj)
if (items != nimport)
- rb_raise(rb_eRuntimeError, "Wrong number of parameters: expected %d, got %d.\n",
+ rb_raise(rb_eRuntimeError, "wrong number of parameters: expected %d, got %d",
nimport, items);
for (i = 0; i < nimport; i++) {
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 4ccba8809a..5ac81114b3 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -202,7 +202,7 @@ BigDecimal_load(VALUE self, VALUE str)
/* First get max prec */
while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
if(!ISDIGIT(ch)) {
- rb_raise(rb_eTypeError, "Load failed: invalid character in the marshaled string");
+ rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
}
m = m*10 + (unsigned long)(ch-'0');
}
@@ -230,7 +230,7 @@ BigDecimal_mode(int argc, VALUE *argv, VALUE self)
fo = VpGetException();
if(val==Qnil) return INT2FIX(fo);
if(val!=Qfalse && val!=Qtrue) {
- rb_raise(rb_eTypeError, "The second argument must be true or false.");
+ rb_raise(rb_eTypeError, "second argument must be true or false");
return Qnil; /* Not reached */
}
if(f&VP_EXCEPTION_INFINITY) {
@@ -250,13 +250,13 @@ BigDecimal_mode(int argc, VALUE *argv, VALUE self)
if(val==Qnil) return INT2FIX(fo);
Check_Type(val, T_FIXNUM);
if(!VpIsRoundMode(FIX2INT(val))) {
- rb_raise(rb_eTypeError, "Invalid rounding mode.");
+ rb_raise(rb_eTypeError, "invalid rounding mode");
return Qnil;
}
fo = VpSetRoundMode((unsigned long)FIX2INT(val));
return INT2FIX(fo);
}
- rb_raise(rb_eTypeError, "The first argument for BigDecimal#mode is invalid.");
+ rb_raise(rb_eTypeError, "first argument for BigDecimal#mode invalid");
return Qnil;
}
@@ -412,7 +412,7 @@ BigDecimal_to_f(VALUE self)
errno = 0;
d2 = pow(10.0,(double)e);
if((errno == ERANGE && e>0) || (d2>1.0 && (fabs(d) > (DBL_MAX / d2)))) {
- VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion.",0);
+ VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
if(d>0.0) return rb_float_new(DBL_MAX);
else return rb_float_new(-DBL_MAX);
}
@@ -940,7 +940,7 @@ BigDecimal_round(int argc, VALUE *argv, VALUE self)
Check_Type(vRound, T_FIXNUM);
sw = FIX2INT(vRound);
if(!VpIsRoundMode(sw)) {
- rb_raise(rb_eTypeError, "Invalid rounding mode.");
+ rb_raise(rb_eTypeError, "invalid rounding mode");
return Qnil;
}
break;
@@ -3304,7 +3304,7 @@ VpCtoV(Real *a, char *int_chr, U_LONG ni, char *frac, U_LONG nf, char *exp_chr,
es = e*((S_INT)BASE_FIG);
e = e * 10 + exp_chr[i] - '0';
if(es>e*((S_INT)BASE_FIG)) {
- return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
+ return VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
}
++i;
}
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index a356568262..c56f18f0f6 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -124,7 +124,7 @@ curses_init_screen()
if (rb_stdscr) return rb_stdscr;
initscr();
if (stdscr == 0) {
- rb_raise(rb_eRuntimeError, "cannot initialize curses");
+ rb_raise(rb_eRuntimeError, "can't initialize curses");
}
clear();
rb_stdscr = prep_window(cWindow, stdscr);
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 95b6dc74dc..7a05115ec5 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -161,7 +161,7 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
Data_Get_Struct(self, struct dl_handle, dlhandle);
if (!dlhandle->open) {
- rb_raise(rb_eRuntimeError, "Closed handle.");
+ rb_raise(rb_eRuntimeError, "closed handle");
}
handle = dlhandle->ptr;
@@ -187,11 +187,11 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
if (!func)
#endif
{
- rb_raise(rb_eRuntimeError, "Unknown symbol \"%sA\".", name);
+ rb_raise(rb_eRuntimeError, "unknown symbol \"%sA\"", name);
}
}
#else
- rb_raise(rb_eRuntimeError, "Unknown symbol \"%s\".", name);
+ rb_raise(rb_eRuntimeError, "unknown symbol \"%s\"", name);
#endif
}
val = rb_dlsym_new(func, name, stype);
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 11edd9a32f..cb5fee6aee 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -94,7 +94,7 @@ ossl_cipher_initialize(VALUE self, VALUE str)
name = StringValuePtr(str);
GetCipher(self, ctx);
if (!(cipher = EVP_get_cipherbyname(name))) {
- ossl_raise(rb_eRuntimeError, "Unsupported cipher algorithm (%s).", name);
+ ossl_raise(rb_eRuntimeError, "unsupported cipher algorithm (%s)", name);
}
if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
ossl_raise(eCipherError, NULL);
@@ -198,7 +198,7 @@ ossl_cipher_pkcs5_keyivgen(int argc, VALUE *argv, VALUE self)
if(!NIL_P(vsalt)){
StringValue(vsalt);
if(RSTRING(vsalt)->len != PKCS5_SALT_LEN)
- rb_raise(eCipherError, "salt must be an 8-octet string.");
+ rb_raise(eCipherError, "salt must be an 8-octet string");
salt = RSTRING(vsalt)->ptr;
}
iter = NIL_P(viter) ? 2048 : NUM2INT(viter);
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index cfd7e4854e..2a03eff6ca 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -375,7 +375,7 @@ getDevice(master,slave)
}
close(i);
}
- rb_raise(rb_eRuntimeError, "Cannot get Master/Slave device");
+ rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
#else
char **p;
char MasterName[DEVICELEN];
@@ -394,7 +394,7 @@ getDevice(master,slave)
close(i);
}
}
- rb_raise(rb_eRuntimeError, "Cannot get %s", SlaveName);
+ rb_raise(rb_eRuntimeError, "can't get %s", SlaveName);
#endif
}
#endif /* HAVE__GETPTY */
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 4c7b08f514..0ac3e109cb 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -488,7 +488,7 @@ hist_get(self, index)
i += state->length;
}
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_tainted_str_new2(state->entries[i]->line);
}
@@ -510,7 +510,7 @@ hist_set(self, index, str)
i += state->length;
}
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
SafeStringValue(str);
replace_history_entry(i, RSTRING(str)->ptr, NULL);
@@ -629,7 +629,7 @@ hist_delete_at(self, index)
if (i < 0)
i += state->length;
if (i < 0 || i > state->length - 1) {
- rb_raise(rb_eIndexError, "Invalid index");
+ rb_raise(rb_eIndexError, "invalid index");
}
return rb_remove_history(i);
}
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 51e0eb56ea..31420d3cf5 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1574,7 +1574,7 @@ unix_send_io(sock, val)
fd = FIX2INT(val);
}
else {
- rb_raise(rb_eTypeError, "IO nor file descriptor");
+ rb_raise(rb_eTypeError, "neither IO nor file descriptor");
}
GetOpenFile(sock, fptr);
@@ -1691,7 +1691,7 @@ unix_recv_io(argc, argv, sock)
msg.msg_accrightslen != sizeof(fd)
#endif
) {
- rb_raise(rb_eSocket, "File descriptor was not passed");
+ rb_raise(rb_eSocket, "file descriptor was not passed");
}
#if FD_PASSING_BY_MSG_CONTROL
@@ -1841,7 +1841,7 @@ setup_domain_and_type(domain, dv, type, tv)
*dv = PF_IPX;
#endif
else
- rb_raise(rb_eSocket, "Unknown socket domain %s", ptr);
+ rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
}
else {
*dv = NUM2INT(domain);
@@ -1872,7 +1872,7 @@ setup_domain_and_type(domain, dv, type, tv)
*tv = SOCK_PACKET;
#endif
else
- rb_raise(rb_eSocket, "Unknown socket type %s", ptr);
+ rb_raise(rb_eSocket, "unknown socket type %s", ptr);
}
else {
*tv = NUM2INT(type);
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 227ed92305..81d3d84b9b 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -765,7 +765,7 @@ strscan_peek(self, vlen)
* s.unscan
* s.scan(/../) # => "te"
* s.scan(/\d/) # => nil
- * s.unscan # ScanError: cannot unscan: prev match had failed
+ * s.unscan # ScanError: can't unscan: prev match had failed
*/
static VALUE
strscan_peep(self, vlen)
@@ -783,7 +783,7 @@ strscan_unscan(self)
GET_SCANNER(self, p);
if (! MATCHED_P(p))
- rb_raise(ScanError, "cannot unscan: prev match had failed");
+ rb_raise(ScanError, "can't unscan: prev match had failed");
p->curr = p->prev;
CLEAR_MATCH_STATUS(p);
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 7a800986b5..5f07799785 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -72,7 +72,7 @@
#define OLEData_Get_Struct(obj, pole) {\
Data_Get_Struct(obj, struct oledata, pole);\
if(!pole->pDispatch) {\
- rb_raise(rb_eRuntimeError, "Failed to get Dispatch Interface");\
+ rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
}\
}
@@ -603,7 +603,7 @@ ole_initialize()
if(gOLEInitialized == Qfalse) {
hr = OleInitialize(NULL);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Fail: OLE initialize");
+ ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
}
gOLEInitialized = Qtrue;
/*
@@ -1364,12 +1364,12 @@ ole_create_dcom(argc, argv, self)
if (!gole32)
gole32 = LoadLibrary("OLE32");
if (!gole32)
- rb_raise(rb_eRuntimeError, "Failed to load OLE32");
+ rb_raise(rb_eRuntimeError, "failed to load OLE32");
if (!gCoCreateInstanceEx)
gCoCreateInstanceEx = (FNCOCREATEINSTANCEEX*)
GetProcAddress(gole32, "CoCreateInstanceEx");
if (!gCoCreateInstanceEx)
- rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment.");
+ rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
rb_scan_args(argc, argv, "2*", &ole, &host, &others);
pbuf = ole_mb2wc(StringValuePtr(ole), -1);
@@ -1381,7 +1381,7 @@ ole_create_dcom(argc, argv, self)
SysFreeString(pbuf);
if (FAILED(hr))
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown OLE server: `%s'",
+ "unknown OLE server: `%s'",
StringValuePtr(ole));
memset(&serverinfo, 0, sizeof(COSERVERINFO));
serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
@@ -1391,7 +1391,7 @@ ole_create_dcom(argc, argv, self)
SysFreeString(serverinfo.pwszName);
if (FAILED(hr))
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create DCOM server `%s' in `%s'",
+ "failed to create DCOM server `%s' in `%s'",
StringValuePtr(ole),
StringValuePtr(host));
@@ -1418,7 +1418,7 @@ ole_bind_obj(moniker, argc, argv, self)
hr = CreateBindCtx(0, &pBindCtx);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create bind context");
+ "failed to create bind context");
}
pbuf = ole_mb2wc(StringValuePtr(moniker), -1);
@@ -1427,7 +1427,7 @@ ole_bind_obj(moniker, argc, argv, self)
if(FAILED(hr)) {
OLE_RELEASE(pBindCtx);
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to parse display name of moniker `%s'",
+ "failed to parse display name of moniker `%s'",
StringValuePtr(moniker));
}
hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL,
@@ -1438,7 +1438,7 @@ ole_bind_obj(moniker, argc, argv, self)
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to bind moniker `%s'",
+ "failed to bind moniker `%s'",
StringValuePtr(moniker));
}
return create_win32ole_object(self, pDispatch, argc, argv);
@@ -1495,7 +1495,7 @@ fole_s_connect(argc, argv, self)
if(FAILED(hr)) {
OLE_RELEASE(pUnknown);
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create WIN32OLE server `%s'",
+ "failed to create WIN32OLE server `%s'",
StringValuePtr(svr_name));
}
@@ -1532,19 +1532,19 @@ fole_s_const_load(argc, argv, self)
if (TYPE(klass) != T_CLASS &&
TYPE(klass) != T_MODULE &&
TYPE(klass) != T_NIL) {
- rb_raise(rb_eTypeError, "2nd paramator must be Class or Module.");
+ rb_raise(rb_eTypeError, "2nd parameter must be Class or Module");
}
if (rb_obj_is_kind_of(ole, cWIN32OLE)) {
OLEData_Get_Struct(ole, pole);
hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
0, lcid, &pTypeInfo);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
if(FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
OLE_RELEASE(pTypeInfo);
if(TYPE(klass) != T_NIL) {
@@ -1564,7 +1564,7 @@ fole_s_const_load(argc, argv, self)
hr = LoadTypeLibEx(pBuf, REGKIND_NONE, &pTypeLib);
SysFreeString(pBuf);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
if(TYPE(klass) != T_NIL) {
ole_const_load(pTypeLib, klass, self);
}
@@ -1574,7 +1574,7 @@ fole_s_const_load(argc, argv, self)
OLE_RELEASE(pTypeLib);
}
else {
- rb_raise(rb_eTypeError, "1st paramator must be WIN32OLE instance");
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE instance");
}
return Qnil;
}
@@ -1720,11 +1720,11 @@ fole_s_show_help(argc, argv, self)
helpfile = target;
}
if (TYPE(helpfile) != T_STRING) {
- rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD).");
+ rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
}
hwnd = ole_show_help(helpfile, helpcontext);
if(hwnd == 0) {
- rb_raise(rb_eRuntimeError, "Failed to open help file `%s'",
+ rb_raise(rb_eRuntimeError, "failed to open help file `%s'",
StringValuePtr(helpfile));
}
return Qnil;
@@ -1769,7 +1769,7 @@ fole_initialize(argc, argv, self)
SysFreeString(pBuf);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown OLE server: `%s'",
+ "unknown OLE server: `%s'",
StringValuePtr(svr_name));
}
@@ -1778,7 +1778,7 @@ fole_initialize(argc, argv, self)
&IID_IDispatch, (void**)&pDispatch);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to create WIN32OLE object from `%s'",
+ "failed to create WIN32OLE object from `%s'",
StringValuePtr(svr_name));
}
@@ -1879,7 +1879,7 @@ ole_invoke(argc, argv, self, wFlags)
rb_scan_args(argc, argv, "1*", &cmd, &paramS);
OLEData_Get_Struct(self, pole);
if(!pole->pDispatch) {
- rb_raise(rb_eRuntimeError, "Failed to get dispatch interface");
+ rb_raise(rb_eRuntimeError, "failed to get dispatch interface");
}
wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
@@ -1887,7 +1887,7 @@ ole_invoke(argc, argv, self, wFlags)
SysFreeString(wcmdname);
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown property or method `%s'",
+ "unknown property or method `%s'",
StringValuePtr(cmd));
}
@@ -1924,7 +1924,7 @@ ole_invoke(argc, argv, self, wFlags)
VariantClear(&op.dp.rgvarg[i]);
}
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Failed to get named argument info: `%s'",
+ "failed to get named argument info: `%s'",
StringValuePtr(cmd));
}
op.dp.rgdispidNamedArgs = &(pDispID[1]);
@@ -2343,7 +2343,7 @@ ole_propertyput(self, property, value)
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
- "Unknown property or method: `%s'",
+ "unknown property or method: `%s'",
StringValuePtr(property));
}
/* set property value */
@@ -2436,7 +2436,7 @@ fole_each(self)
if (FAILED(hr)) {
VariantClear(&result);
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to get IEnum Interface");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to get IEnum Interface");
}
if (V_VT(&result) == VT_UNKNOWN)
@@ -2449,7 +2449,7 @@ fole_each(self)
(void**)&pEnum);
if (FAILED(hr) || !pEnum) {
VariantClear(&result);
- ole_raise(hr, rb_eRuntimeError, "Failed to get IEnum Interface");
+ ole_raise(hr, rb_eRuntimeError, "failed to get IEnum Interface");
}
VariantClear(&result);
@@ -2474,7 +2474,7 @@ fole_missing(argc, argv, self)
id = rb_to_id(argv[0]);
mname = rb_id2name(id);
if(!mname) {
- rb_raise(rb_eRuntimeError, "Fail: unknown method or property");
+ rb_raise(rb_eRuntimeError, "fail: unknown method or property");
}
n = strlen(mname);
if(mname[n-1] == '=') {
@@ -2504,7 +2504,7 @@ ole_method_sub(self, pOwnerTypeInfo, pTypeInfo, name)
VALUE method = Qnil;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cFuncs && method == Qnil; i++) {
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, i, &pFuncDesc);
@@ -2543,7 +2543,7 @@ olemethod_from_typeinfo(self, pTypeInfo, name)
VALUE method = Qnil;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
method = ole_method_sub(self, 0, pTypeInfo, name);
if (method != Qnil) {
@@ -2579,7 +2579,7 @@ ole_methods_sub(pOwnerTypeInfo, pTypeInfo, methods, mask)
WORD i;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cFuncs; i++) {
pstr = NULL;
@@ -2620,7 +2620,7 @@ ole_methods_from_typeinfo(pTypeInfo, mask)
VALUE methods = rb_ary_new();
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
ole_methods_sub(0, pTypeInfo, methods, mask);
@@ -2653,7 +2653,7 @@ typeinfo_from_ole(pole, ppti)
HRESULT hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
0, lcid, &pTypeInfo);
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo,
-1,
@@ -2663,7 +2663,7 @@ typeinfo_from_ole(pole, ppti)
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &i);
OLE_RELEASE(pTypeInfo);
if (FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
for (i = 0; i < count; i++) {
@@ -2772,12 +2772,12 @@ fole_obj_help( self )
hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo );
if(FAILED(hr)) {
- ole_raise(hr, rb_eRuntimeError, "Failed to GetTypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
}
hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
if(FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to GetContainingTypeLib");
+ ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
}
hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
&bstr, NULL, NULL, NULL);
@@ -3010,12 +3010,12 @@ fole_method_help( self, cmdname )
OLEData_Get_Struct(self, pole);
hr = typeinfo_from_ole(pole, &pTypeInfo);
if(FAILED(hr))
- ole_raise(hr, rb_eRuntimeError, "Failed to get ITypeInfo");
+ ole_raise(hr, rb_eRuntimeError, "failed to get ITypeInfo");
method = folemethod_s_allocate(cWIN32OLE_METHOD);
obj = olemethod_from_typeinfo(method, pTypeInfo, cmdname);
OLE_RELEASE(pTypeInfo);
if (obj == Qnil)
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found %s",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
StringValuePtr(cmdname));
return obj;
}
@@ -3045,7 +3045,7 @@ foletype_s_ole_classes(self, typelib)
pbuf = ole_mb2wc(StringValuePtr(file), -1);
hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
SysFreeString(pbuf);
ole_classes_from_typelib(pTypeLib, classes);
OLE_RELEASE(pTypeLib);
@@ -3220,11 +3220,11 @@ foletype_initialize(self, typelib, oleclass)
pbuf = ole_mb2wc(StringValuePtr(file), -1);
hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to LoadTypeLibEx");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
SysFreeString(pbuf);
if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
OLE_RELEASE(pTypeLib);
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found `%s` in `%s`",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found `%s` in `%s`",
StringValuePtr(oleclass), StringValuePtr(typelib));
}
OLE_RELEASE(pTypeLib);
@@ -3413,7 +3413,7 @@ ole_type_major_version(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ver = INT2FIX(pTypeAttr->wMajorVerNum);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return ver;
@@ -3442,7 +3442,7 @@ ole_type_minor_version(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ver = INT2FIX(pTypeAttr->wMinorVerNum);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return ver;
@@ -3471,7 +3471,7 @@ ole_type_typekind(pTypeInfo)
HRESULT hr;
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
typekind = INT2FIX(pTypeAttr->typekind);
OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
return typekind;
@@ -3621,7 +3621,7 @@ ole_variables(pTypeInfo)
VALUE variables = rb_ary_new();
hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
if (FAILED(hr)) {
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetTypeAttr");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
}
for(i = 0; i < pTypeAttr->cVars; i++) {
@@ -3701,7 +3701,7 @@ static ole_variable_ole_type(pTypeInfo, var_index)
VALUE type;
hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetVarDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
return type;
@@ -3730,7 +3730,7 @@ static ole_variable_ole_type_detail(pTypeInfo, var_index)
VALUE type = rb_ary_new();
hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetVarDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), type);
pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
return type;
@@ -3936,12 +3936,12 @@ folemethod_initialize(self, oletype, method)
Data_Get_Struct(oletype, struct oletypedata, ptype);
obj = olemethod_from_typeinfo(self, ptype->pTypeInfo, method);
if (obj == Qnil) {
- rb_raise(eWIN32OLE_RUNTIME_ERROR, "Not found %s",
+ rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
StringValuePtr(method));
}
}
else {
- rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object.");
+ rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
}
return obj;
}
@@ -3969,7 +3969,7 @@ ole_method_return_type(pTypeInfo, method_index)
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
@@ -4001,7 +4001,7 @@ ole_method_return_vtype(pTypeInfo, method_index)
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if (FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
@@ -4065,7 +4065,7 @@ ole_method_invkind(pTypeInfo, method_index)
VALUE invkind;
hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
if(FAILED(hr))
- ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "Failed to GetFuncDesc");
+ ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
invkind = INT2FIX(pFuncDesc->invkind);
pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
return invkind;
@@ -5267,7 +5267,7 @@ fev_initialize(argc, argv, self)
rb_scan_args(argc, argv, "11", &ole, &itf);
if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
- rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object.");
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object");
}
if(TYPE(itf) != T_NIL) {
@@ -5294,7 +5294,7 @@ fev_initialize(argc, argv, self)
if (FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
ole_raise(hr, rb_eRuntimeError,
- "Failed to query IConnectionPointContainer");
+ "failed to query IConnectionPointContainer");
}
hr = pContainer->lpVtbl->FindConnectionPoint(pContainer,
@@ -5303,7 +5303,7 @@ fev_initialize(argc, argv, self)
OLE_RELEASE(pContainer);
if (FAILED(hr)) {
OLE_RELEASE(pTypeInfo);
- ole_raise(hr, rb_eRuntimeError, "Failed to query IConnectionPoint");
+ ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint");
}
pIEV = EVENTSINK_Constructor();
pIEV->m_iid = iid;
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index b5e016eebb..98f60cbcbb 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -2995,7 +2995,7 @@ rb_gzreader_readchar(obj)
VALUE dst;
dst = rb_gzreader_getc(obj);
if (NIL_P(dst)) {
- rb_raise(rb_eEOFError, "End of file reached");
+ rb_raise(rb_eEOFError, "end of file reached");
}
return dst;
}
@@ -3177,7 +3177,7 @@ rb_gzreader_readline(argc, argv, obj)
VALUE dst;
dst = rb_gzreader_gets(argc, argv, obj);
if (NIL_P(dst)) {
- rb_raise(rb_eEOFError, "End of file reached");
+ rb_raise(rb_eEOFError, "end of file reached");
}
return dst;
}