python: handle SPDYLAY_ERR_INVALID_ARGUMENT from in submit_{reply,response}

This commit is contained in:
Tatsuhiro Tsujikawa 2012-08-21 23:27:32 +09:00
parent 0be5ac6ffb
commit 4de4d1e9ef
1 changed files with 4 additions and 0 deletions

View File

@ -608,6 +608,8 @@ cdef class Session:
free(cnv)
if rv == 0:
return
elif rv == cspdylay.SPDYLAY_ERR_INVALID_ARGUMENT:
raise InvalidArgumentError(cspdylay.spdylay_strerror(rv))
elif rv == cspdylay.SPDYLAY_ERR_NOMEM:
raise MemoryError()
@ -637,6 +639,8 @@ cdef class Session:
free(cnv)
if rv == 0:
return
elif rv == cspdylay.SPDYLAY_ERR_INVALID_ARGUMENT:
raise InvalidArgumentError(cspdylay.spdylay_strerror(rv))
elif rv == cspdylay.SPDYLAY_ERR_NOMEM:
raise MemoryError()