Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Latest commit

 

History

History
19 lines (15 loc) · 454 Bytes

16.1.3 - swoole_strerror.md

File metadata and controls

19 lines (15 loc) · 454 Bytes

swoole_strerror

将错误码转换成错误信息。函数原型:

string swoole_strerror(int $errno, int $error_type = 1);

错误类型

  • 1:标准的Unix Errno,由系统调用错误产生,如EAGAINETIMEDOUT
  • 2getaddrinfo错误码,由DNS操作产生
  • 9Swoole底层错误码,使用swoole_last_error()得到

使用实例

var_dump(swoole_strerror(swoole_last_error(), 9));