mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
Refactoring
This commit is contained in:
parent
6df337b0c4
commit
301fb1ae13
@ -24,7 +24,7 @@ extern "C" int JNI_OnLoad(JavaVM*, void*);
|
||||
#include "avian/process.h"
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <errno.h>
|
||||
const char* getErrnoDescription(int err); // This function is defined in mingw-extensions.cpp
|
||||
#endif
|
||||
|
||||
using namespace vm;
|
||||
@ -805,137 +805,6 @@ setField(Thread* t, object field, object instance, object value)
|
||||
|
||||
namespace vm {
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
const char* getErrnoDescription(int err)
|
||||
{
|
||||
switch (err) {
|
||||
|
||||
// EACCES
|
||||
case EACCES:
|
||||
return "Permission denied";
|
||||
|
||||
case EFAULT:
|
||||
return "Bad address";
|
||||
|
||||
// EINTR
|
||||
case EINTR:
|
||||
return "Interrupted function call";
|
||||
|
||||
// EINVAL
|
||||
case EINVAL:
|
||||
return "Invalid argument";
|
||||
|
||||
// EBADF
|
||||
case EBADF:
|
||||
return "File handle is not valid";
|
||||
|
||||
// EMFILE
|
||||
case EMFILE:
|
||||
return "Too many open files";
|
||||
|
||||
// EWOULDBLOCK
|
||||
case EWOULDBLOCK:
|
||||
return "Resource temporarily unavailable";
|
||||
|
||||
// EINPROGRESS
|
||||
case EINPROGRESS:
|
||||
return "Operation now in progress";
|
||||
|
||||
// EALREADY
|
||||
case EALREADY:
|
||||
return "Operation already in progress";
|
||||
|
||||
// ENOTSOCK
|
||||
case ENOTSOCK:
|
||||
return "Socket operation on nonsocket";
|
||||
|
||||
// EDESTADDRREQ
|
||||
case EDESTADDRREQ:
|
||||
return "Destination address required";
|
||||
|
||||
// EMSGSIZE
|
||||
case EMSGSIZE:
|
||||
return "Message too long";
|
||||
|
||||
// EPROTOTYPE
|
||||
case EPROTOTYPE:
|
||||
return "Protocol wrong type for socket";
|
||||
|
||||
// ENOPROTOOPT
|
||||
case ENOPROTOOPT:
|
||||
return "Bad protocol option";
|
||||
|
||||
// EPROTONOSUPPORT
|
||||
case EPROTONOSUPPORT:
|
||||
return "Protocol not supported";
|
||||
|
||||
// EOPNOTSUPP
|
||||
case EOPNOTSUPP:
|
||||
return "Operation not supported";
|
||||
|
||||
// EAFNOSUPPORT
|
||||
case EAFNOSUPPORT:
|
||||
return "Address family not supported by protocol family";
|
||||
|
||||
// EADDRINUSE
|
||||
case EADDRINUSE:
|
||||
return "Address already in use";
|
||||
|
||||
// EADDRNOTAVAIL
|
||||
case EADDRNOTAVAIL:
|
||||
return "Cannot assign requested address";
|
||||
|
||||
// ENETDOWN
|
||||
case ENETDOWN:
|
||||
return "Network is down";
|
||||
|
||||
// ENETUNREACH
|
||||
case ENETUNREACH:
|
||||
return "Network is unreachable";
|
||||
|
||||
// ENETRESET
|
||||
case ENETRESET:
|
||||
return "Network dropped connection on reset";
|
||||
|
||||
// ECONNABORTED
|
||||
case ECONNABORTED:
|
||||
return "Software caused connection abort";
|
||||
|
||||
// ECONNRESET
|
||||
case ECONNRESET:
|
||||
return "Connection reset by peer";
|
||||
|
||||
// ENOBUFS
|
||||
case ENOBUFS:
|
||||
return "No buffer space available";
|
||||
|
||||
// EISCONN
|
||||
case EISCONN:
|
||||
return "Socket is already connected";
|
||||
|
||||
// ENOTCONN
|
||||
case ENOTCONN:
|
||||
return "Socket is not connected";
|
||||
|
||||
// ETIMEDOUT
|
||||
case ETIMEDOUT:
|
||||
return "Connection timed out";
|
||||
|
||||
// ECONNREFUSED
|
||||
case ECONNREFUSED:
|
||||
return "Connection refused";
|
||||
|
||||
// EHOSTUNREACH
|
||||
case EHOSTUNREACH:
|
||||
return "No route to host";
|
||||
|
||||
default:
|
||||
return "Undescribed error";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Classpath*
|
||||
makeClasspath(System*, Allocator* allocator, const char*, const char*)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user