Search Results

Search found 16643 results on 666 pages for 'exception handling'.

Page 22/666 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How can I tell Visual Studio to not catch a particular exception?

    - by Noel Kennedy
    I have a particular type of exception that I would like Visual Studio to not catch with the Exception Assistant. Essentially I would like it just to let my normal exception handling infrastructure deal with it. The exception is an inheritor of System.Exception which I wrote and have the source code for. Any where this is thrown I want VS to not catch it, ie it is not useful to just supress a single throw new BlahException(); in code. This is because the exception is thrown a lot, and I don't want to have to supress every single instance individually. In case it makes a difference I am on Visual Studio 2010 Ultimate, Framework 3.5 SP1.

    Read the article

  • MySQLi error handling

    - by Spoonface
    Is it possible to specify that MySQLi sends any errors and warnings to the PHP default 'error_log' directive? I can't seem to find any error options for the class specification, and I don't wish to handle errors manually like so: if ($result = $mysqli->query("...")) { } else handle $mysqli->error;

    Read the article

  • How can I tell Visual Studio to NOT BREAK on a particular exception?

    - by Noel Kennedy
    I have a particular type of exception that I would like Visual Studio to not catch with the Exception Assistant. Essentially I would like it just to let my normal exception handling infrastructure deal with it. The exception is an inheritor of System.Exception which I wrote and have the source code for. Any where this is thrown I want VS to not catch it, ie it is not useful to just supress a single throw new BlahException(); in code. This is because the exception is thrown a lot, and I don't want to have to supress every single instance individually. In case it makes a difference I am on Visual Studio 2010 Ultimate, Framework 3.5 SP1.

    Read the article

  • Handling scroll event on listview in c#

    - by murasaki5
    I have a listview that generates thumbnail using a backgroundworker. When the listview is being scrolled i want to pause the backgroundworker and get the current value of the scrolled area, when the user stopped scrolling the listview, resume the backgroundworker starting from the item according to the value of the scrolled area. Is it possible to handle scroll event of a listview? if yes how? if not then what is a good alternative according to what i described above?

    Read the article

  • Handling user input in C

    - by Stuart
    In C, I am writing a program which is taking in user input than comparing it to see which output it should use. I am finding it problomatic and was wondering if someone could give me a hand. So far I have: while(cmd[0] != EOF){ fgets(cmd, sizeof(cmd), stdin); /** Takes in user input and stores it in cmd **/ if(cmd[0] == '\n') printf("%s> ", cwd); else if(strcmp(cmd, "ls") == 0) printf("I will list everything"); } Any ideas? Basically it is just ignoring any user input when there is some. P.S. The variable cwd is just a string.

    Read the article

  • Basic QT Event handling / Threading questions ?

    - by umanga
    Greetings , I am new to QT (4.6) and have some basic questions regarding its event mechanism.I come from Swing background so I am trying to compare it with QT. 1) Does Event-processing-loop run in seperate thread? (like EventDispatch thread in Swing) ? 2) If we open several 'QMainWindow' do they run in several threads? 3) Whats the best way to run an intensive process in a seperate thread? (like SwingWorker in Swing ? ) 4) If intesive-process runs in a seperate thread ,is it possible to call UI methods like update(),repaint() from that process? thanks in advance.

    Read the article

  • Best practice for error handling in codeigniter / php apps

    - by Industrial
    Hi everyone, We're working with a new codeigniter based application that are cross referencing different PHP functions forwards and backwards from various libraries, models and such. We're running PHP5 on the server and we try to find a good way for managing errors and status reports that arises from the usage of our functions. While using return in functions, the execution is ended, so nothing more can be sent back. Right? What's the best practice to send a status information or error code upon ending execution of actual function? Should we look into using exceptions or any other approach? http://us.php.net/manual/en/language.exceptions.php

    Read the article

  • .net exception pool

    - by javier
    I want to create a mecanism in a large .net application to handle all the exceptions in the application, and to save the error messages (in db or log file) so these errors can be fixed, and so we are aware of the problems in the application. Does anyone know a good way of creating a library to handle and process all the exceptions?. Are there any tools around that can simplify my task. What aproach would you suggest me to take.... If you previously implemented something similar to what I want to do, I do want to heard from you Thanks all

    Read the article

  • Can Grails exceptionHandler support the following Error Handling Flow

    - by Andrew
    In my rails app that I am porting to grails whenever an unexpected error occurs I intercept the error automatically and display a form to the user informing them that an error has occured and asking them for further information. Meanwhile, as the form is rendered I write the stack trace and other information about who was logged in to a database table. Then if the form is submitted I add that information to the error report. I cannot tell from the exceptionHandler documentation and BootStrap examples whether that will allow me to grab all the information including various session and request parameters and then stuff them into a database and then post a form. Any thoughts?

    Read the article

  • Android / Java rare and seemingly impossible exception causing force close

    - by Guzba
    Hello all, I have an interesting problem being reported to me from an android application I have published. I have a two-dimensional array that I am iterating through using two for loops like so: for (int i = 0; i < arr.length; ++i) { for (int j = 0; j < arr[i].length; ++j) { if (arr[i][j] != 0) // does stuff } } The problem is, somehow arr[i][j] != 0 is throwing an ArrayIndexOutOfBoundsException. But very rarely. I have thousands of people use the app on a daily basis and get maybe twenty force close reports. Is this something I can't avoid, maybe a problem with the phones memory, etc. or is there something I can do that I haven't thought of yet? Thanks.

    Read the article

  • Set reference = null in finally block?

    - by deamon
    A colleague of mine sets reference to null in finally blocks. I think this is nonsense. public Something getSomething() { JDBCConnection jdbc=null; try { jdbc=JDBCManager.getConnection(JDBCTypes.MYSQL); } finally { JDBCManager.free(jdbc); jdbc=null; // <-- Useful or not? } } What do you think of it?

    Read the article

  • Recommended approach for error handling with PHP and MYSQL

    - by iama
    I am trying to capture database (MYSQL) errors in my PHP web application. Currently, I see that there are functions like mysqli_error(), mysqli_errno() for capturing the last occurred error. However, this still requires me to check for error occurrence using repeated if/else statements in my php code. You may check my code below to see what I mean. Is there a better approach to doing this? (or) Should I write my own code to raise exceptions and catch them in one single place? What is the recommended approach? Also, does PDO raise exceptions? Thanks. function db_userexists($name, $pwd, &$dbErr) { $bUserExists = false; $uid = 0; $dbErr = ''; $db = new mysqli(SERVER, USER, PASSWORD, DB); if (!mysqli_connect_errno()) { $query = "select uid from user where uname = ? and pwd = ?"; $stmt = $db->prepare($query); if ($stmt) { if ($stmt->bind_param("ss", $name, $pwd)) { if ($stmt->bind_result($uid)) { if ($stmt->execute()) { if ($stmt->fetch()) { if ($uid) $bUserExists = true; } } } } if (!$bUserExists) $dbErr = $db->error(); $stmt->close(); } if (!$bUserExists) $dbErr = $db->error(); $db->close(); } else { $dbErr = mysqli_connect_error(); } return $bUserExists; }

    Read the article

  • WCF - Error Handling

    - by inutan
    Hello there, I have my WCF Service hosted in Windows Service. The client application is a website project to which I added the Service reference. I was not using any error logging/tracing... but now I feel I should implement as it will help me not to make void guesses. Please guide me for the best practice so that I can quickly handle errors and pin point the exact issue. Thank you!

    Read the article

  • Handling click events on z-index'd layers

    - by Alex
    I have 2 z-index layers in a map application I'm building. I have a problem when I click on the layers to zoom in. The click handler is on the underlying z-index layer and I don't want it to fire when a control in the overlying layer is clicked. The problem i have is that the event gets raised no matter what but the originalTarget property of the event is not the image in the underlying layer when something on the top layer is clicked. Is there anyway to change this?

    Read the article

  • Is catching NumberFormatException a bad practice?

    - by integeruser
    I have to parse a String that can assume hex values or other non-hex values 0xff, 0x31 or A, PC, label, and so on. I use this code to divide the two cases: String input = readInput(); try { int hex = Integer.decode(input); // use hex ... } catch (NumberFormatException e) { // input is not a hex, continue parsing } Can this code be considered "ugly" or difficult to read? Are there other (maybe more elegant) solutions? EDIT : I want to clarify that (in my case) a wrong input doesn't exist: i just need to distinguish if it is a hex number, or not. And just for completeness, i'm making a simple assebler for DCPU-16.

    Read the article

  • javascript error handling

    - by pankaj
    I have a javascript function for checking errors which I am calling on OnClicentClick event of a button. Once it catch a error I want to stop execution of the click event. But in my case it always it always executes the onclick event. Following is my function: function DisplayError() { if (document.getElementById('<%=txtPassword.ClientID %>').value.length < 6 || document.getElementById('<%=txtPassword.ClientID %>').value.length > 12) { document.getElementById('<%=lblError.ClientID %>').innerText = "Password length must be between 6 to 12 characters"; return false; } var str = <%=PhoneNumber()%>; if(str.length <10) { alert('<%=phoneNum%>'.length); document.getElementById('<%=lblError.ClientID %>').innerText = "Phone Number not in correct format"; return false; } } button html code: <asp:Button runat="server" Text="Submit" ID="btnSubmit" ValidationGroup="submit" onclick="btnSubmit_Click" OnClientClick="DisplayError()"/> It should not execute the button click event once it satisfies any of the IF condition in the javascript function.

    Read the article

  • Compact Framework Non Culture Specific Exception Messages

    - by Ian
    Hi Everyone, I have created an application in Compact Framework 2.0 This application is being used in many various counties and cultures. My Issue is that any and all exceptions are logged, but they are appearing in the culture of the device, in some cases this means i am unable to read them. Any help or suggestions will be appreciated Thanks

    Read the article

  • Throwing out of range exception in C++

    - by Shinka
    This code works; int at(int index) { if(index < 1 || index >= size) throw 0; return x[index]; } Yet this doesn't int at(int index) { if(index < 1 || index >= size) throw std::out_of_range; return x[index]; } I get the error "expected primary expression before ';'". Now... it surprises me because I know std::out_of_range exists and I have #include <stdexcept>

    Read the article

  • Improving exception handling ?

    - by n00b
    Hello, I am a newbie programmer and I recently started learning about exception handling in Java. I know what try, catch and finally blocks do, but I really need to understand how to use them well and where to handle something in the call stack... I have a project right now that involves I/O and all I'm doing is handling the exception in the lowest possible method in the call stack. I'm sure my exception handling can be improved, so I'm asking you guys how you think of exception handling? How did you guys get good at this and how can I better wrap my head around this idea?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >