zmq_strerror.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. zmq_strerror(3)
  2. ===============
  3. NAME
  4. ----
  5. zmq_strerror - get 0MQ error message string
  6. SYNOPSIS
  7. --------
  8. *const char *zmq_strerror (int 'errnum');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_strerror()_ function shall return a pointer to an error message string
  12. corresponding to the error number specified by the 'errnum' argument. As 0MQ
  13. defines additional error numbers over and above those defined by the operating
  14. system, applications should use _zmq_strerror()_ in preference to the standard
  15. _strerror()_ function.
  16. RETURN VALUE
  17. ------------
  18. The _zmq_strerror()_ function shall return a pointer to an error message
  19. string.
  20. ERRORS
  21. ------
  22. No errors are defined.
  23. EXAMPLE
  24. -------
  25. .Displaying an error message when a 0MQ context cannot be initialised
  26. ----
  27. void *ctx = zmq_init (1, 1, 0);
  28. if (!ctx) {
  29. printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno));
  30. abort ();
  31. }
  32. ----
  33. SEE ALSO
  34. --------
  35. linkzmq:zmq[7]
  36. AUTHORS
  37. -------
  38. This page was written by the 0MQ community. To make a change please
  39. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.