error-code

MapViewOfFile failes with errorCode 6 (Invalid Handle)

被刻印的时光 ゝ 提交于 2019-12-01 14:24:38
问题 Im trying to map the file to the memory and use MapViewOfFile(), but it failes with error code 6. I tried just about anything, I also read about big files being the problem, but the problem happens also with a 1kb file. my code: HANDLE hFile = CreateFile(pFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); e = GetLastError(); printf("CreateFile Errorcode %d\n", GetLastError()); if (hFile == INVALID_HANDLE_VALUE) { printf("Error: could not create handle to file"); printf(

error_code: how to set and check errno

不打扰是莪最后的温柔 提交于 2019-12-01 07:35:20
I'm trying to understand what category I should use, when calling a C function that sets errno on Linux. I'm not sure all the possible error codes are defined by POSIX, so I'm tempted to use the system_category . But I like to handle generic condition in my code later on, so I would like to do things like that: std::error_code ec; some_func(some_path, ec); if (ec) { if (ec == std::errc::file_exists) { // special handling } return ec; } To set the error code in some_func() , I expected to proceed like this: ec.assign(EEXIST, std::system_category()); Mostly based on this discussion: <system

WSO2 ESB unknown error code 102511

心不动则不痛 提交于 2019-12-01 01:06:19
I have recently upgraded WSO2 ESB to version 4.7 on the Windows Server 2008 R2 and encountered the next error while simply proxying SOAP request to an endpoint: Receiving response while the handler is in an inconsistent state REQUEST_HEAD ERROR_CODE : 102511 ERROR_MESSAGE : Error in Sender ERROR_DETAIL : Error in Sender ERROR_EXCEPTION : null Thing is, that this error code is not described in the documentation and without an exception it is not obvious what to make of it. The closest code I could find was SND_INVALID_STATE = 102510 and judging from the source code it seems that the request

How do I make Liferay 6.1.0 always redirect to a 404 page when a resource isn't found?

戏子无情 提交于 2019-12-01 00:31:34
I have created a simple hook for a Liferay site I have. It contains a 404.jsp that overrides the default Liferay 404. It works fine if I type in a specific page. For example: Going to http://localhost:8080/jooky.jsp throws SEVERE: PWC6117: File "C%3A%5Cbundles%5Cliferay-portal-6.1.0-ce-ga1%5Cglassfish-3.1.1%5Cdomains%5Cdomain1%5Capplications%5Cliferay-portal%5Cjooky.jsp" not found in my Glassfish server log and redirects me to my custom /errors/404.jsp without a problem. However, going to http://localhost:8080/jooky throws a different error INFO: 14:07:41,790 INFO [PortalImpl:4873] Current URL

What is “Trace/BPT trap: 5”? [closed]

北城以北 提交于 2019-11-30 17:29:41
What does Trace/BPT trap: 5 mean, when a Mac OS X application suddenly exits? Searching the web I only found out that a lot of applications exit like this (ruby, postgres) but only find application specific solution. But I want to understand what that is and how it is caused. I also found that it seems to be an issue on Mac OS X only (did not find any mentions of this happening with Linux or Windows). I believe it has something to do with threading, but I'm not sure about that one. It has to do with not being able to find/load a dylib , which is specific to OSX. Which one it can't find, is as

How can I get php to return 500 upon encountering a fatal exception?

感情迁移 提交于 2019-11-30 11:15:22
问题 PHP fatal errors come back as status code 200 to the HTTP client. How can I make it return a status code 500 (Internal server error)? 回答1: header("HTTP/1.1 500 Internal Server Error"); 回答2: This is exactly the problem I had yesterday and I found solution as follows: 1) first of all, you need to catch PHP fatal errors, which is error type E_ERROR. when this error occurs, script will be stored the error and terminate execution. you can get the stored error by calling function error_get_last().

Difference between Linux errno 23 and Linux errno 24

拟墨画扇 提交于 2019-11-30 08:55:48
问题 What is the difference between these 2 linux errors in errno.h ? 23 and 24 I tried 2 different sites but can't understand difference between the two. [EMFILE] Too many open files. [ENFILE] Too many files open in system. # define ENFILE 23 /* File table overflow */ # define EMFILE 24 /* Too many open files */ Also, I am getting errno 24 and socket call failing at 974th time. ( AF_INET UDP datagram socket) When I did a cat /proc/sys/fs/file-max I am seeing a value of 334076 ulimit -n showing

Oracle java 7 Installation in Ubuntu E: Sub-process /usr/bin/dpkg returned an error code (1)

怎甘沉沦 提交于 2019-11-30 07:45:02
I can't install oracle java 7 following the steps provided in this link: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer I get the following: Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: visualvm ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-kochi-gothic ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho ttf-arphic-uming The following NEW packages will be installed: oracle-java7-installer 0

What is “Trace/BPT trap: 5”? [closed]

大城市里の小女人 提交于 2019-11-30 01:10:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . What does Trace/BPT trap: 5 mean, when a Mac OS X application suddenly exits? Searching the web I only found out that a lot of applications exit like this (ruby, postgres) but only find application specific solution. But I want to understand what that is and how it is caused. I also found that it seems to be an

How do I look up the proper Windows System Error Code to use in my application?

烂漫一生 提交于 2019-11-29 15:28:25
I am writing a C# .NET 2.0 application wherein when a message is expected to be received via the SerialPort . If the frame is not received (i.e. times out) or it is determined to be invalid, I need to set an error code using SetLastError . Windows has a plethora of error codes. Is there a simple tool or reference to help narrow down the proper error code to use? ADDITIONAL INFO While throwing an exception and handling it higher up the stack is my preference, that is not an option in this case because the application I am updating was not designed to take advantage of such a useful feature.