Search Results

Search found 13797 results on 552 pages for 'structured exception'.

Page 7/552 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to get full callstack of FaultException

    - by Yosi Cohen
    Hi, I have a WCF service that throws an exception. I get a FaultException in the client without an InnerException. I only have part of the callstack of the original exception, from which it's hard to understand what caused this. How do I get the original exception or at least all the callstack? Thanks.

    Read the article

  • Control.EndInvoke resets call stack for exception

    - by Brian Rasmussen
    I don't do a lot of Windows GUI programming, so this may all be common knowledge to people more familiar with WinForms than I am. Unfortunately I have not been able to find any resources to explain the issue, I encountered today during debugging. If we call EndInvoke on an async delegate. We will get any exception thrown during execution of the method re-thrown. The call stack will reflect the original source of the exception. However, if we do something similar on a Windows.Forms.Control, the implementation of Control.EndInvoke resets the call stack. This can be observed by a simple test or by looking at the code in Reflector. The relevant code excerpt from EndInvoke is here: if (entry.exception != null) { throw entry.exception; } I understand that Begin/EndInvoke on Control and async delegates are different, but I would have expected similar behavior on Control.EndInvoke. Is there any reason Control doesn't do whatever it is async delegates do to preserve the original call stack?

    Read the article

  • Catch database exception in Kohana

    - by danilo
    I'm using Kohana 2. I would like to catch a database exception to prevent an error page when no connection to the server can be established. The error displayed is system/libraries/drivers/Database/Mysql.php [61]: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 The database server is not reachable at all at this point. I'm doing this from a model. I tried both public function __construct() { // load database library into $this->db try { parent::__construct(); } catch (Exception $e) { die('Database error occured'); } } as well as try { $hoststatus = $this->db->query('SELECT x FROM y WHERE z;'); } catch (Exception $e) { die('Database error occured'); } ...but none of them seemed to work. It seems as if no exception gets passed on from the main model. Is there another way to catch the database error and use my own error handling?

    Read the article

  • spring mvc simpleformcontroller - how to stop execution when exception thrown

    - by alan t
    Hi I am using simpleformcontroller and get exception thrown in my OnSubmit method. This does not seem to stop the simpleformcontroler process as it redisplays my form. I can see from log4j output that the exception is getting caught and forwarding to my error page as expected. I can also tell the onSubmit method does not continue after the exception. Which is all good. But i do not see the error page as the simpleformcontroller starts up again and goes through processing for a new form (i can see in log4j ouput Spring log statements 'Displaying New form', 'Creating new command of class ..'. The normal form page is then displayed again. So the problem is that the exception does not seem to terminate the SimpleFormController, it carries on to display the form again. Anyone help? Thanks Alan

    Read the article

  • floating exception using icc compiler

    - by Hristo
    I'm compiling my code via the following command: icc -ltbb test.cxx -o test Then when I run the program: time ./mp6 100 > output.modified Floating exception 4.871u 0.405s 0:05.28 99.8% 0+0k 0+0io 0pf+0w I get a "Floating exception". This following is code in C++ that I had before the exception and after: // before if (j < E[i]) { temp += foo(0, trr[i], ex[i+j*N]); } // after temp += (j < E[i])*foo(0, trr[i], ex[i+j*N]); This is boolean algebra... so (j < E[i]) is either going to be a 0 or a 1 so the multiplication would result either in 0 or the foo() result. I don't see why this would cause a floating exception. This is what foo() does: int foo(int s, int t, int e) { switch(s % 4) { case 0: return abs(t - e)/e; case 1: return (t == e) ? 0 : 1; case 2: return (t < e) ? 5 : (t - e)/t; case 3: return abs(t - e)/t; } return 0; } foo() isn't a function I wrote so I'm not too sure as to what it does... but I don't think the problem is with the function foo(). Is there something about boolean algebra that I don't understand or something that works differently in C++ than I know of? Any ideas why this causes an exception? Thanks, Hristo

    Read the article

  • C++ Win32 Unhandled Exception Handler

    - by uray
    currently I used SetUnhandledExceptionFilter() to provide callback to get information when an unhandled exception was occurred, that callback will provides me with EXCEPTION_RECORD which provides ExceptionAddress. [1]what is actually ExceptionAddress is? does it the address of function / code that gives exception, or the memory address that some function tried to access? [2]is there any better mechanism that could give me better information when unhandled exception occured? (I can't use debug mode or add any code that affect runtime performance, since crash is rare and only on release build when code run as fast as possible) [3]is there any way for me to get several callstack address when unhandled exception occured. [4]suppose ExceptionAddress has address A, and I have DLL X loaded and executed at base address A-x, and some other DLL Y at A+y, is it good to assume that crash was PROBABLY caused by code on DLL X?

    Read the article

  • Exception from within a finally block

    - by schrödingers cat
    Consider the following code where LockDevice() could possibly fail and throw an exception on ist own. What happens in C# if an exception is raised from within a finally block? UnlockDevice(); try { DoSomethingWithDevice(); } finally { LockDevice(); // can fail with an exception }

    Read the article

  • To get which function threw exception in javascript

    - by uzay95
    I am trying to create a Exception class to get and send errors from client to server. I want to catch exception in javascript function and push the details to the web service to write to database. But i couldn't get how to get which function/line throwed this exception. Is there any way to solve this?

    Read the article

  • How do I use the information about exceptions a method throws in .NET in my code?

    - by dotnetdev
    For many methods in .NET, the exceptions they can potentially throw can be as many as 7-8 (one or two methods in XmlDocument, Load() being one I think, can throw this many exceptions). Does this mean I have to write 8 catch blocks to catch all of these exceptions (it is best practise to catch an exception with a specific exception block and not just a general catch block of type Exception). How do I use this information? Thanks

    Read the article

  • To get which function throwed exception in javascript

    - by uzay95
    I am trying to create a Exception class to get and send errors from client to server. I want to catch exception in javascript function and push the details to the web service to write to database. But i couldn't get how to get which function/line throwed this exception. Is there any way to solve this?

    Read the article

  • Java: is Exception class thread-safe?

    - by Vilius Normantas
    As I understand, Java's Exception class is certainly not immutable (methods like initCause and setStackTrace give some clues about that). So is it at least thread-safe? Suppose one of my classes has a field like this: private final Exception myException; Can I safely expose this field to multiple threads? I'm not willing to discuss concrete cases where and why this situation could occur. My question is more about the principle: can I tell that a class which exposes field of Exception type is thread-safe? Another example: class CustomException extends Exception { ... } Is this class thread-safe?

    Read the article

  • Continue executing with thrown exception?

    - by fsdfa
    There's something really weird, I have (in C++): func(); cout << "Heeey" << endl; And func, throws an exception: "throw string("ERROR");". But the cout is done, and the exception is successfully catched. Why it prints "Heeey" if there was an exception before?.

    Read the article

  • Exception handling - what happens after it leaves catch

    - by Tony
    So imagine you've got an exception you're catching and then in the catch you write to a log file that some exception occurred. Then you want your program to continue, so you have to make sure that certain invariants are still in a a good state. However what actually occurs in the system after the exception was "handled" by a catch? The stack has been unwound at that point so how does it get to restore it's state?

    Read the article

  • Exception Handling in MVP Passive View

    - by ilmatte
    Hello, I'm wondering what's the preferred way to manage exceptions in an MVP implemented with a Passive View. There's a discussion in my company about putting try/catch blocks in the presenter or only in the view. In my opinion the logical top level caller is the presenter (even if the actual one is the view). Moreover I can test the presenter and not the view. This is the reason why I prefer to define a method in the view interface: IView.ShowError(error) and invoke it from the catch blocks in the presenter: try { } catch (Exception exception) { ...log exception... view.ShowError("An error occurred") } In this way the developers of future views can safely forget to implement exception handling but the IView interface force them to implement a ShowError method. The drawback is that if I want to feel completely safe I need to add redundant try/catch blocks in the view. The other way would be to add try catch blocks only in the views and not introducing the showerror method in the view interface. What do you suggest?

    Read the article

  • Confused by this PHP Exception try..catch nesting

    - by Domenic
    Hello. I'm confused by the following code: class MyException extends Exception {} class AnotherException extends MyException {} class Foo { public function something() { print "throwing AnotherException\n"; throw new AnotherException(); } public function somethingElse() { print "throwing MyException\n"; throw new MyException(); } } $a = new Foo(); try { try { $a->something(); } catch(AnotherException $e) { print "caught AnotherException\n"; $a->somethingElse(); } catch(MyException $e) { print "caught MyException\n"; } } catch(Exception $e) { print "caught Exception\n"; } I would expect this to output: throwing AnotherException caught AnotherException throwing MyException caught MyException But instead it outputs: throwing AnotherException caught AnotherException throwing MyException caught Exception Could anyone explain why it "skips over" catch(MyException $e) ? Thanks.

    Read the article

  • Windows/C++: Is it possible to find the line of code where exception was thrown having "Exception Of

    - by Pavel
    One of our users having an Exception on our product startup. She has sent us the following error message from Windows: Problem Event Name: APPCRASH Application Name: program.exe Application Version: 1.0.0.1 Application Timestamp: 4ba62004 Fault Module Name: agcutils.dll Fault Module Version: 1.0.0.1 Fault Module Timestamp: 48dbd973 Exception Code: c0000005 Exception Offset: 000038d7 OS Version: 6.0.6002.2.2.0.768.2 Locale ID: 1033 Additional Information 1: 381d Additional Information 2: fdf78cd6110fd6ff90e9fff3d6ab377d Additional Information 3: b2df Additional Information 4: a3da65b92a4f9b2faa205d199b0aa9ef Is it possible to locate the exact place in the source code where the exception has occured having this information? What is the common technique for C++ programmers on Windows to locate the place of an error that has occured on user computer? Our project is compiled with Release configuration, PDB file is generated. I hope my question is not too naive.

    Read the article

  • Exception handling in Iterable

    - by Maas
    Is there any way of handling -- and continuing from -- an exception in an iterator while maintaining the foreach syntactic sugar? I've got a parser that iterates over lines in a file, handing back a class-per-line. Occasionally lines will be syntactically bogus, but that doesn't necessarily mean that we shouldn't keep reading the file. My parser implements Iterable, but dealing with the potential exceptions means writing for (Iterator iter = myParser.iterator(); iter.hasNext(); ) { try { MyClass myClass = iter.next(); // .. do stuff .. } catch (Exception e) { // .. do exception stuff .. } } .. nothing wrong with that, but is there any way of getting exception handling on the implicit individual iter.next() calls in the foreach construct?

    Read the article

  • Exception is swallowed by finally

    - by fiction
    static int retIntExc() throws Exception{ int result = 1; try { result = 2; throw new IOException("Exception rised."); } catch (ArrayIndexOutOfBoundsException e) { System.out.println(e.getMessage()); result = 3; } finally { return result; } } A friend of mine is a .NET developer and currently migrating to Java and he ask me the following question about this source. In theory this must throw IOException("Exception rised.") and the whole method retIntExc() must throws Exception. But nothing happens, the method returns 2. I've not tested his example, but I think that this isn't the expected behavior. EDIT: Thanks for all answers. Some of you have ignored the fact that method is called retIntExc, which means that this is only some test/experimental example, showing problem in throwing/catching mechanics. I didn't need 'fix', I needed explanation why this happens.

    Read the article

  • Is the "message" of an exception culturally independent?

    - by Ray Hayes
    In an application I'm developing, I have the need to handle a socket-timeout differently from a general socket exception. The problem is that many different issues result in a SocketException and I need to know what the cause was. There is no inner exception reported, so the only information I have to work with is the message: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond" This question has a general and specific part: is it acceptable to write conditional logic based upon the textual representation of an exception? Is there a way to avoid needing exception handling? Example code below... try { IPEndPoint endPoint = null; client.Client.ReceiveTimeout = 1000; bytes = client.Receive(ref endPoint); } catch( SocketException se ) { if ( se.Message.Contains("did not properly respond after a period of time") ) { // Handle timeout differently.. } }

    Read the article

  • To get which function/line threw exception in javascript

    - by uzay95
    I am trying to create a Exception class to get and send errors from client to server. I want to catch exception in javascript function and push the details to the web service to write to database. But i couldn't get how to get which function/line throwed this exception. Is there any way to solve this?

    Read the article

  • An introduction to Dart, the structured web programming platform

    An introduction to Dart, the structured web programming platform Learn more about Dart at www.dartlang.org Seth Ladd presents Dart, the open source web programming platform. In this video, Seth gives an overview of the philosophy and motivation of the language, reviews some of the interesting new language features like optional static types and isolates, and gives a demo of the editor. Special thanks to http for recording the video, and for the invitation. From: GoogleDevelopers Views: 2 0 ratings Time: 01:01:44 More in Science & Technology

    Read the article

  • CVE-2006-4514 Buffer overflow vulnerability in Gnome Structured File library (libgsf)

    - by RitwikGhoshal
    CVE DescriptionCVSSv2 Base ScoreComponentProduct and Resolution CVE-2006-4514 Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability 7.5 Gnome Structured File library (libgsf) Solaris 10 SPARC: 149108-01 X86: 149109-01 This notification describes vulnerabilities fixed in third-party components that are included in Oracle's product distributions.Information about vulnerabilities affecting Oracle products can be found on Oracle Critical Patch Updates and Security Alerts page.

    Read the article

  • Structured data: Field missing: price [on hold]

    - by Handi Occasion
    I just set up my site to make it better thanks to the micro-referenced data. After finishing the creation of meta-data, I checked via webmaster tool the result of my work and my a priori data are taken into account (see here). Today I had a look through the webmaster tools - Structured Data and then surprise! I have a groin ad 50 with the error field missing: price while the price is this! any idea? thank you

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >