Search Results

Search found 36003 results on 1441 pages for 'try catch'.

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

  • Dash doesn't launch Gedit at the first try

    - by GUI Junkie
    I'm curious to find out what's going on here. Push the [windows] key -- Dash pops up. Type 'ge' -- 'Text editor' appears. [Enter] -- Nothing happens. With any other program, it launches the program. Repeat the steps and gedit launches. From terminal, gedit doesn't start. In the system monitor, it's 'sleeping'. This happens in my session, in my wife's session on the same computer, gedit runs. Any idea why gedit sleeps at the first launch?

    Read the article

  • No Time for IT? Try Managed Services

    If maintaining your small business computer systems is a drag on your time and psyche, consider IT outsourcing. It frees up time, delivers better results, and a recent study shows it&#146;s more affordable than you might think.

    Read the article

  • No Time for IT? Try Managed Services

    If maintaining your small business computer systems is a drag on your time and psyche, consider IT outsourcing. It frees up time, delivers better results, and a recent study shows it&#146;s more affordable than you might think.

    Read the article

  • No Time for IT? Try Managed Services

    If maintaining your small business computer systems is a drag on your time and psyche, consider IT outsourcing. It frees up time, delivers better results, and a recent study shows it&#146;s more affordable than you might think.

    Read the article

  • C# Compiler should give warning but doesn't?

    - by Cristi Diaconescu
    Someone on my team tried fixing a 'variable not used' warning in an empty catch clause. try { ... } catch (Exception ex) { } - gives a warning about ex not being used. So far, so good. The fix was something like this: try { ... } catch (Exception ex) { string s = ex.Message; } Seeing this, I thought "Just great, so now the compiler will complain about s not being used." But it doesn't! There are no warnings on that piece of code and I can't figure out why. Any ideas? PS. I know catch-all clauses that mute exceptions are a bad thing, but that's a different topic. I also know the initial warning is better removed by doing something like this, that's not the point either. try { ... } catch (Exception) { } or try { ... } catch { }

    Read the article

  • Globally Log Catch Exception e

    - by sqlBugs
    Suppose that I have a legacy java application with thousands of lines of code which do: try { // stuff } catch (Exception e) { // eat the exception } Is there any global option that I could flip or 3rd party JAR which would log all "eaten" exceptions? I know that I could do a massive find replace (search for catch (Exception e) { and replace it with catch(Exception e) { logException(e);) but I was wondering if there was a better solution. Thanks!

    Read the article

  • try/catch: errors or exceptions?

    - by Josh
    OK. I may be splitting hairs here, but my code isn't consistent and I'd like to make it so. But before I do, I want to make sure I'm going the right way. In practice this doesn't matter, but this has been bothering me for a while so I figured I'd ask my peers... Every time I use a try... catch statement, in the catch block I always log a message to my internal console. However my log messages are not consistent. They either look like: catch(err) { DFTools.console.log("someMethod caught an error: ",err.message); ... or: catch(ex) { DFTools.console.log("someMethod caught an exception: ",ex.message); ... Obviously the code functions properly either way but it's starting to bother me that I sometimes refer to "errors" and sometimes to "exceptions". Like I said, maybe I'm splitting hairs but which is the proper terminology? "Exception", or "Error"?

    Read the article

  • Catch All (handled or unhandled) Exceptions

    - by andySF
    Hi, I want to catch all exceptions raised (handled or unhandled) to log them. for unhandled i use ThreadExceptionEventHandler and UnhandledExceptionEventHandler but i want to catch and exceptions that are in try catch block with or without (Exception e). It's possible to inherit the exceptions class to create a general event?

    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

  • cakephp - try/catch an Action

    - by joshs
    I would like to somehow apply a try catch statement to all Actions as a backstop for any uncaught exceptions. I think this would be particularly helpful for Ajax Actions, because the catch statement could send back a default 4xx status code. Prototype's onFailure() function could then do the client-side error handling. How can I do this without wrapping the Action call with a try/catch in the cake dispatcher like this: try { output = $controller->dispatchMethod($params['action'], $params['pass']); } catch {...} Does anybody have a suggestion or another workable strategy for gaining this functionality without touching the dispatcher? How do people feel about putting exception handling in the Displatcher? I imagine when cake drops php 4 support, there will be a built-in mechanism for this.

    Read the article

  • SQL Server catch error from extended stored procedure

    - by haxelit
    Hello I have an extended stored procedure that sends an error message. srv_sendmsg(pSrvProc, SRV_MSG_ERROR, errorNum, SRV_FATAL_SERVER, 1, NULL, 0, (DBUSMALLINT) __LINE__, buff, SRV_NULLTERM); I've set the severity to SVR_FATAL_SERVER just as a test to see if I can cause the message to throw an exception in the sql. In my SQL i'm doing: BEGIN TRY EXEC dbo.xp_somethingCool SET @Error = @@ERROR END TRY BEGIN CATCH PRINT 'AN Error occoured!' SELECT ERROR_NUMBER() AS ErrorNumber ,ERROR_MESSAGE() AS ErrorMessage; END CATCH I would think that when my xp sends the error message the tsql would catch the error and select the error_number and error_message. Instead what ends up happening is that the xp sends the message and the T-SQL continues on its way like nothing happened. The @@Error variable doesn't get set either. So I was wondering if there was any trick to getting SQL to catch an error from an XP ? Thanks, Raul

    Read the article

  • JavaScript try/catch: errors or exceptions?

    - by Josh
    OK. I may be splitting hairs here, but my code isn't consistent and I'd like to make it so. But before I do, I want to make sure I'm going the right way. In practice this doesn't matter, but this has been bothering me for a while so I figured I'd ask my peers... Every time I use a try... catch statement, in the catch block I always log a message to my internal console. However my log messages are not consistent. They either look like: catch(err) { DFTools.console.log("someMethod caught an error: ",err.message); ... or: catch(ex) { DFTools.console.log("someMethod caught an exception: ",ex.message); ... Obviously the code functions properly either way but it's starting to bother me that I sometimes refer to "errors" and sometimes to "exceptions". Like I said, maybe I'm splitting hairs but which is the proper terminology? "Exception", or "Error"?

    Read the article

  • How to catch exception on RollBack

    - by Jagd
    What is the best way to implement error handling for a SqlTransaction RollBack that already exists within a catch clause? My code is roughly like this: using (SqlConnection objSqlConn = new SqlConnection(connStr)) { objSqlConn.Open(); using (SqlTransaction objSqlTrans = objSqlConn.BeginTransaction()) { try { // code // more code // and more code } catch (Exception ex) { // What happens if RollBack() has an exception? objSqlTrans.Rollback(); throw ex; } } } I believe that my application had an exception in the try block, which in turn was caught in the catch block and then the RollBack was attempted. However, the error that I'm seeing says something about a SqlTransaction.ZombieCheck(), which is making me wonder if the RollBack() itself threw an exception as well. So, do I need to implement some type of error handling at the RollBack()? How do I do that and manage to hold on to the exception that put the execution into the catch block in the first place?

    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

  • Why catch Exceptions in Java, when you can catch Throwables?

    - by corfield
    Hi We recently had a problem with a Java server application where the application was throwing Errors which were not caught because Error is a separate subclass of Throwable and we were only catching Exceptions. We solved the immediate problem by catching Throwables rather than Exceptions, but this got me thinking as to why you would ever want to catch Exceptions, rather than Throwables, because you would then miss the Errors. So, why would you want to catch Exceptions, when you can catch Throwables?

    Read the article

  • Question about multiple 'catch'

    - by chun
    Can anyone tell me why the output of this class is 'xa'? why the other exception won't be caught? public class Tree { public static void main(String... args){ try { throw new NullPointerException(new Exception().toString()); } catch (NullPointerException e) { System.out.print("x"); } catch (RuntimeException e) { System.out.print("y"); } catch (Exception e) { System.out.print("z"); } finally{System.out.println("a");} } }

    Read the article

  • C++ catch constructor exception

    - by aaa
    hi. I do not seem to understand how to catch constructor exception. Here is relevant code: struct Thread { rysq::cuda::Fock fock_; template<class iterator> Thread(const rysq::cuda::Centers &centers, const iterator (&blocks)[4]) : fock_() { if (!fock_) throw; } }; Thread *ct; try { ct = new Thread(centers_, blocks); } catch(...) { return false; } // catch never happens, So catch statement do not execute and I get unhandled exception. What did I do wrong? this is straight C++ using g++.

    Read the article

  • AS3 try/catch out of memory

    - by StfnoPad
    Hi, I'm loading a few huge images on my flex/as3 app, but I can't manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont know what to catch): try{ images = new Array(frames); for (var i:uint = 0; i < frames; i++){ imagesBA[i] = new BitmapData(width, height, false, 0x000000FF); } } catch(error:????){ Alert.show("Out of memory!"); } Any idea what ???? can be? Or does anyone knows how to catch when there is no memory for a variable?

    Read the article

  • Is there a phrase or word to describe an algorithim or programme is complete in that given any value for its arguments there is a predictable outcome?

    - by Mrk Mnl
    Is there a phrase to describe an algorithim or programme is complete in that given any possible value for its arguments there is a predicatable outcome? i.e. all the ramifications have been considered whatever the context? A simple example would be the below function: function returns string get_item_type(int type_no) { if(type_no < 10) return "hockey stick" else if (type_no < 20) return "bulldozer" else return "unknown" } (excuse the dismal pseudo code) No matter what number is supplied all possibiblites are catered for. My question is: is there a word to fill the blank here: "get_item_type() is ______ complete" ? (The answer is not Turing Complete - that is something quite different - but I annoyingly always think of something as "Turing Complete" when I am thinking of the above).

    Read the article

  • Is there a phrase or word to describe an algorithim or program is complete in that given any value for its arguments there is a defined outcome?

    - by Mrk Mnl
    Is there a phrase or word to describe an algorithim or programme is complete in that given any value for its arguments there is a defined outcome? i.e. all the ramifications have been considered whatever the context? A simple example would be the below function: function returns string get_item_type(int type_no) { if(type_no < 10) return "hockey stick" else if (type_no < 20) return "bulldozer" else return "unknown" } (excuse the dismal pseudo code) No matter what number is supplied all possibiblites are catered for. My question is: is there a word to fill the blank here: "get_item_type() is ______ complete" ? (The answer is not Turing Complete - that is something quite different - but I annoyingly always think of something as "Turing Complete" when I am thinking of the above).

    Read the article

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