[−][src]Module libcgroup_rs::error
6.Error handling
URL: Error handling
Functions:
- cgroup_get_last_errno
- cgroup_strerror
Usage:
use libcgroup_rs::error::{cg_get_last_errno, cg_get_last_error_str}; fn main()->Result<(),Box<dyn std::error::Error>>{ println!("EC = {}",cg_get_last_errno()); println!("EC Str = {}",cg_get_last_error_str()); Ok(()) }
Statics
C_EC_CONTROLLER_CREATE_FAILED | code = 50012 |
C_EC_CONTROLLER_EXISTS | code = 50009 |
C_EC_FAIL | code = 50013 |
C_EC_GROUP_CONFIG_PARSE_FAIL | code = 50024, failed to parse config(cgconfig.conf) |
C_EC_GROUP_EOF | code = 50023, not an real error, it just indicates that that iterator has come to end of sequence and no more items are left. |
C_EC_GROUP_MOUNT_FAIL | code = 50021 |
C_EC_GROUP_MOUNT_NAMESPACE | code = 50027 |
C_EC_GROUP_MULTI_MOUTHED | code = 50006, controller bound to different mount points |
C_EC_GROUP_NAMESPACE_CONTROLLER | code = 50026 |
C_EC_GROUP_NAMESPACE_PATHS | code = 50025 |
C_EC_GROUP_NOT_ALLOWED | code = 50007 |
C_EC_GROUP_NOT_COMPILED | code = 50000 |
C_EC_GROUP_NOT_CREATED | code = 50003 |
C_EC_GROUP_NOT_EQUAL | code = 50017 |
C_EC_GROUP_NOT_EXIST | code = 50002 |
C_EC_GROUP_NOT_INITIALIZED | code = 50014 |
C_EC_GROUP_NOT_MOUNTED | code = 50001 |
C_EC_GROUP_NOT_OWNER | code = 50005 |
C_EC_GROUP_NO_RULES | code = 50020, rules List does not exist |
C_EC_GROUP_PARSE_FAIL | code = 50019, failed to parse rules configuration file |
C_EC_GROUP_ROLLER_NOT_EQUAL | code = 50018 |
C_EC_GROUP_SENTINEL | code = 50022, not an real error, just a auxiliary mark in the enum |
C_EC_GROUP_SUBSYS_NOT_MOUNTED | code = 50004 |
C_EC_GROUP_VALUE_NOT_EXIST | code = 50015 |
C_EC_INVAL | code = 50011 |
C_EC_MAX_VALUES_EXCEEDED | code = 50008 |
C_EC_OTHER | code = 50016, represents error coming from other libraries like glibc |
C_EC_VALUE_EXISTS | code = 50010 |
C_GROUP_SUCCESS | code = 0, success |
Functions
cg_convert_c_error | Convert to Rust errno(libc::c_int to std::i32) |
cg_get_error | Convert to Rust Error(cgroup_strerror) |
cg_get_last_c_errno | Get last error number in c(cgroup_get_last_errno) |
cg_get_last_errno | Get last error number in Rust |
cg_get_last_error_str | Get last error string in Rust |