Code Monkey home page Code Monkey logo

error-code's Introduction

error-code

Crates.io Documentation Build

Error code library provides generic errno/winapi error wrapper

User can define own Category if you want to create new error wrapper.

Usage

use error_code::ErrorCode;

use std::fs::File;

File::open("non_existing");
println!("{}", ErrorCode::last_system());

error-code's People

Contributors

doumanash avatar

Stargazers

dzmitry-lahoda avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

error-code's Issues

`if` is not allowed in a `const fn`

I'm compiling this crate because it's a dependency of the clipboard-win crate that I'm using.

It used to work alright, but today I'm re-compiling and I get an error message:

   Compiling error-code v2.0.1
error[E0658]: `if` is not allowed in a `const fn`
   --> c:\dev-tools\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\error-code-2.0.1\src\lib.rs:141:13
    |
141 | /             if self.code == 10035 {
142 | |                 return true;
143 | |             }
    | |_____________^
    |
    = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
    = help: add `#![feature(const_if_match)]` to the crate attributes to enable

I'm on rustc 1.45.0-nightly (f8d394e51 2020-05-05).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.