X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FException.h;h=28e0793816dbfcf448416fe5e441623792be1d1b;hb=24c892da36fc7d4f8cad6a3c94bdf6f1024d99c4;hp=30444b2bdaa193f17a0eb6764b20294cb95b45f4;hpb=9895ee085d445ae3ae6becdddfb9c8f9d8f6c1f5;p=folly.git diff --git a/folly/Exception.h b/folly/Exception.h index 30444b2b..28e07938 100644 --- a/folly/Exception.h +++ b/folly/Exception.h @@ -1,5 +1,5 @@ /* - * Copyright 2016 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef FOLLY_EXCEPTION_H_ -#define FOLLY_EXCEPTION_H_ +#pragma once #include @@ -67,7 +66,7 @@ void checkPosixError(int err, Args&&... args) { template void checkKernelError(ssize_t ret, Args&&... args) { if (UNLIKELY(ret < 0)) { - throwSystemErrorExplicit(-ret, std::forward(args)...); + throwSystemErrorExplicit(int(-ret), std::forward(args)...); } } @@ -119,5 +118,3 @@ void throwOnFail(V&& value, Args&&... args) { ::folly::throwOnFail((cond), "Check failed: " #cond) } // namespace folly - -#endif /* FOLLY_EXCEPTION_H_ */