[][src]Function program::perror

pub fn perror<E: Display>(e: E) -> !

Print an error message to stderr and exit with an exit status of 1.

While this function attempts to obtain and write the name of the current process to stderr, write e to stderr, and exit with an exit status of 1, only exiting is guranteed. Unfortunately a lot can go wrong when getting the name of the current process. If for any reason the name of the current process cannot be formed, just print the error given by the user. If the error given by the use cannot be written to stderr just exit with an exit status of 1.