diff --git a/src/main/java/org/zeromq/ZMQException.java b/src/main/java/org/zeromq/ZMQException.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/zeromq/ZMQException.java
+++ b/src/main/java/org/zeromq/ZMQException.java
@@ -43,6 +43,18 @@ public class ZMQException extends RuntimeException
         code = errno;
     }
 
+    public ZMQException(String message, int errno)
+    {
+        super(message);
+        code = errno;
+    }
+
+    public ZMQException(ZMQException cause)
+    {
+        super(cause.getMessage(), cause);
+        code = cause.code;
+    }
+
     public int getErrorCode()
     {
         return code;
Added constructors to ZMQException