Skip to content

Commit bb03ed7

Browse files
committed
Raise error if client is unable to execute statement
1 parent ea655aa commit bb03ed7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/tiny_tds/client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ static VALUE rb_tinytds_execute(VALUE self, VALUE sql) {
252252
REQUIRE_OPEN_CLIENT(cwrap);
253253
dbcmd(cwrap->client, StringValueCStr(sql));
254254
if (dbsqlsend(cwrap->client) == FAIL) {
255-
rb_warn("TinyTds: dbsqlsend() returned FAIL.\n");
256-
return Qfalse;
255+
rb_raise(cTinyTdsError, "failed to execute statement");
256+
return self;
257257
}
258258
cwrap->userdata->dbsql_sent = 1;
259259
result = rb_tinytds_new_result_obj(cwrap);

0 commit comments

Comments
 (0)