exception

Application exiting with an exit code of -1073740771

家住魔仙堡 提交于 2020-01-13 10:10:32
问题 I have a WPF application, which sometimes is exiting with an exit code of -1073740771. The issue is not occurring in any pattern and it's varying from system to system. In some system the issue is occurring for less that 10% of the total cases and in other system I am seeing it occurring at a rate of almost 30% of the total cases. I haven't been able to form any solid repro steps and it seems to be happening at random. The symptoms include that after I have clicked the close button, the

PHP Debug in Visual Studio Code breaks on every exception

假装没事ソ 提交于 2020-01-13 09:43:07
问题 I am just starting to use the PHP Debug extension in Visual Studio Code (Ubuntu 14.04). It mostly works fine for me, but I have a problem that every time an exception is thrown, the debugger automatically breaks. We have lots of exceptions which are internally caught and handled in our code, so I don't want to have to step through each of these. I've been trying to find something like the Exception Settings in Visual Studio 2015, but can't find any equivalent options within Visual Studio Code

Throw and preserve stack trace not as expected as described by Code Analysis

杀马特。学长 韩版系。学妹 提交于 2020-01-13 08:39:49
问题 Doing a code analysis gave me item CA2200: CA2200 Rethrow to preserve stack details 'func()' rethrows a caught exception and specifies it explicitly as an argument. Use 'throw' without an argument instead, in order to preserve the stack location where the exception was initially raised. I have implemented the suggestion, but I seem to get the same stack trace regardless. Here is my test code and output (the white space is intended to give obvious line numbers): Expected error at Line 30 using

Spring @ControllerAdvice vs ErrorController

最后都变了- 提交于 2020-01-13 08:29:29
问题 In my REST service app, I am planning to create a @ControllerAdvice class to catch controller thrown exceptions and return ResponseEntity objects according to the error type. But I already have a @RestController class implementing the ErrorController interface to catch all exceptions. Do these two interfere in any manner? In which cases will ErrorController be called when @ControllerAdvice exists? Edit: The ErrorController code as requested @RestController public class ControllerCustomError

XDocument.Load(XmlReader) Possible Exceptions

◇◆丶佛笑我妖孽 提交于 2020-01-13 07:31:26
问题 What are the possible exceptions that can be thrown when XDocument.Load(XmlReader) is called? It is hard to follow best practices (i.e. avoiding generic try catch blocks) when the documentation fails to provide crucial information. Thanks in advance for your assistance. 回答1: MSDN says: The loading functionality of LINQ to XML is built upon XmlReader.Therefore, you might catch any exceptions that are thrown by the XmlReader. Create overload methods and the XmlReader methods that read and parse

PySFTP/Paramiko exceptions leaking into stderr

旧时模样 提交于 2020-01-13 06:50:08
问题 I am trying to catch paramiko exceptions but they are still written to stderr. Is there a way to stop writing there? EDIT: It happens even before paramiko gets involved: import pysftp try: pysftp.Connection(host="localhost") except Exception as e: print(e) Results in: Example with proper SFTP params: UPDATE: $ pipenv graph ... pysftp==0.2.9 - paramiko [required: >=1.17, installed: 2.6.0] ... $ pipenv run python Python 3.7.3 (default, Jul 19 2019, 11:21:39) [Clang 11.0.0 (clang-1100.0.28.3)]

Python core dump on sys.exit() from signal handler

北城以北 提交于 2020-01-13 06:14:08
问题 I am seeing python core dump for a seemingly harmless program. I have written following piece of code to demonstrate my problem: proc = None def __signalHandler(signum, frame): print "In __signalHandler" if proc is not None: print "Send signal to BG proc" os.killpg(os.getpgid(proc.pid), signal.SIGINT) print "Wait for it to finish" proc.communicate() print "sys exit" sys.exit(130) signal.signal(signal.SIGINT, __signalHandler) # Start the process proc = subprocess.Popen(["a.out"], stdout

Invalid length for a Base-64 char array while decryption

烂漫一生 提交于 2020-01-13 03:15:46
问题 I get the following exception in some cases through (decryption) , and i can't recognize exactly the reason : Invalid length for a Base-64 char array My Code : public static string encodeSTROnUrl(string thisEncode) { if (null == thisEncode) return string.Empty; return HttpUtility.UrlEncode(Encrypt(thisEncode)); } // string thisDecode = "3Dn%2bsJJPXprU4%3d"; //this is the value which cause the exception. public static string decodeSTROnUrl(string thisDecode) { return Decrypt(HttpUtility

Invalid length for a Base-64 char array while decryption

我只是一个虾纸丫 提交于 2020-01-13 03:14:16
问题 I get the following exception in some cases through (decryption) , and i can't recognize exactly the reason : Invalid length for a Base-64 char array My Code : public static string encodeSTROnUrl(string thisEncode) { if (null == thisEncode) return string.Empty; return HttpUtility.UrlEncode(Encrypt(thisEncode)); } // string thisDecode = "3Dn%2bsJJPXprU4%3d"; //this is the value which cause the exception. public static string decodeSTROnUrl(string thisDecode) { return Decrypt(HttpUtility

Fetch only first N lines of a Stack Trace

大兔子大兔子 提交于 2020-01-12 18:45:29
问题 I have a Factory method that returns an object from a ID call. Mock code: public static Object getById(String id) { Object o = CRUD.doRecovery(Class, id); if(o == null) { printLogMessage("recovery by ID returned Null: " + id); // would really like to show only a few lines of stack trace. } return o; } How can I show only the first N lines of the stack trace (so I know the caller of the method) without dumping the whole stack trace on the log or having to rely on external libs? 回答1: I'm