Skip to content

Commit bc2ae03

Browse files
committed
Socket::IncomingMessage: Don't throw C++ exception
1 parent ad59b30 commit bc2ae03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

binding.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,12 +988,12 @@ namespace zmq {
988988
public:
989989
inline MessageReference() {
990990
if (zmq_msg_init(&msg_) < 0)
991-
throw std::runtime_error(ErrorMessage());
991+
Nan::ThrowError(ErrorMessage());
992992
}
993993

994994
inline ~MessageReference() {
995995
if (zmq_msg_close(&msg_) < 0)
996-
throw std::runtime_error(ErrorMessage());
996+
Nan::ThrowError(ErrorMessage());
997997
}
998998

999999
inline operator zmq_msg_t*() {

0 commit comments

Comments
 (0)