Search Results

Search found 6686 results on 268 pages for 'catch all'.

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

  • Catch-all DNS record

    - by Christian Sciberras
    Intro Our users have the ability to buy a domain (eg: user1.com) and make it point to out website, (eg: example.com), by simply pointing user1.com to ns1/ns2.example.com . Issue So far everything's good, however, example.com does not like this; we need to set up WHM/cpanel to make the server accept user1.com . Problem is, we'd rather made this automatic, possibly without having to use WHM API. The question We need some sort of "catch-all" wildcard entry so that we capture all of our user's possible domains.

    Read the article

  • Catch and identify source of browser launch events

    - by beldaz
    My Windows XP computer is exhibiting strange behaviour, launching multiple browser windows, but not to any URL. Initially this was in Firefox, but when I uninstalled it the same happened in IE. Norton 360 detects no malware, and I wonder if there is some application that is accidentally causing the problem. I'd like to diagnose the problem further. It seems that the default browser is being launched by something, so I'd like to work out the culprit. Is there some method (or handy utility) that can catch requests to XP to launch the default browser, and identify the source?

    Read the article

  • Exclude specific domains from Apache2 serverAlias while using a catch all *(wildcard) alias

    - by Victor S
    I have a web application that needs to support custom domains, in that regard I have set-up the following name based virtual server: <VirtualHost *:80> ServerName example.com ServerAlias * *.example.com www.example.com example.com RailsEnv production RackEnv production DocumentRoot /srv/www/example/current/public <Directory /srv/www/example/current/public> AllowOverride all Options -MultiViews FollowSymLinks </Directory> ErrorLog /srv/www/example/log/error.log TransferLog /srv/www/example/log/access.log </VirtualHost> Notice the * as the server alias? that catches all the domains on that server. However, I have other sites on this server which I want to be excluded from this list. It is more economical for me to have a list of excluded domains than manually set every domain a user may register with at this service as a serverAlias... Perhaps this is not the best way to go, but I'm looking for help, in the best (relatively simple) way to set up a web-app that may catch any domains, while allowing other specific domains to be routed to different apps. Thanks!

    Read the article

  • How to catch all exceptions in Flex?

    - by Yaba
    When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he does not use the debug flash player. In this case he does not get an exception pop up, but he UI is not working. So for supportability reasons, I would like to catch any exception that can happen anywhere in the Flex UI and present an error message in a Flex internal popup. By using Java I would just encapsulate the whole UI code in a try/catch block, but with MXML applications in Flex I do not know, where I could perform such a general try/catch.

    Read the article

  • Disposables, Using & Try/Catch Blocks

    - by Aren B
    Having a mental block today, need a hand verifying my logic isn't fubar'ed. Traditionally I would do file i/o similar to this: FileStream fs = null; // So it's visible in the finally block try { fs = File.Open("Foo.txt", FileMode.Open); /// Do Stuff } catch(IOException) { /// Handle Stuff } finally { if (fs != null) fs.Close(); } However, this isn't very elegant. Ideally I'd like to use the using block to dispose of the filestream when I'm done, however I am unsure about the synergy between using and try/catch. This is how i'd like to implement the above: try { using(FileStream fs = File.Open("Foo.txt", FileMode.Open)) { /// Do Stuff } } catch(Exception) { /// Handle Stuff } However, I'm worried that a premature exit (via thrown exception) from within the using block may not allow the using block to complete execution and clean up it's object. Am I just paranoid, or will this actually work the way I intend it to?

    Read the article

  • c# catch clipboard changes, wont work if form minimized to tray

    - by AnyM
    Hi .. i have a problem using the "Catch Clipboard Events code" found on this link : http://stackoverflow.com/questions/621577/clipboard-event-c/2487582#2487582 the code works great only if the form stays in the foreground, not minimized to tray BUT: if you add a notifyicon and minimize the form to tray and turn the showintaskbar to false (so that you only have an icon in the tray), the program wont catch any clipboard changes anymore ... even if you maximize the form back, it wont work again ...you have to restart the program .. any idea on how to solve this issue !? how can i catch clipboard changes, even if the form is minimized into the tray !? any help is really appreciated ... Thanks

    Read the article

  • Unable to catch exception from Activator.CreateInstance.

    - by Patrik Hägne
    OK, I admit it this code will just look weird to you, and that's because it is weird. This is just code to reproduce the behavior, not code I want to use. class Program { static void Main(string[] args) { try { Activator.CreateInstance(typeof(Func<int>), new object[] { new object(), IntPtr.Zero }); } catch { Console.WriteLine("This won't print!"); } Console.Write("Actually this will not print either!"); Console.ReadLine(); } } No matter what exception type I try to catch (the actual exception thrown is an ArgumentException as far as I can tell) the code inside the catch block will not execute. Actually execution will just stop at the Activator.CreateInstance-line.

    Read the article

  • java checked exception in a catch clause compilation error

    - by srandpersonia
    Hi, I was expecting an compilation error in the following program because of the throw statement in the catch block as IOException is a checked exception and it is not caught by another try block within the catch block. But I am getting "Hurray!" printed. Any explanation would be much appreciated. According to JLS 11.2.3, http://java.sun.com/docs/books/jls/third_edition/html/exceptions.html It is a compile-time error if a method or constructor body can throw some exception type E when both of the following hold: * E is a checked exception type * E is not a subtype of some type declared in the throws clause of the method or constructor. import java.io.*; public class Test{ public static void main(String args[]) { System.out.println(method()); } public static int method() { try{ throw new Exception(); } catch(Exception e){ throw new IOException(); //No compile time error } finally{ System.out.println("Hurray!"); } } } Thanks in advance.

    Read the article

  • try-catch in JavaScript : how to get stack trace or line number of the original error

    - by Greg Bala
    When using TRY-CATCH in JavaScript, how to get the line number of the line that caused the error? On many browsers, the below code will work great and I will get the stack trace that points to the actual line that throw the exception. However, some browsers do not have "e.stack". Iphone's safari is one example. Is there someway to get the line number that will work for all browsers? try { // lots of code here var i = v.WillGenerateError; // how to get this line number in catch?? // lots of code here } catch (e) { alert (e.stack) // this will not work on iPhone, for example } Many thanks!

    Read the article

  • Is it safe to catch EXCEPTION_GUARD_PAGE

    - by Michael J
    Environment is VC++ 9 on various Win platforms (XP and later) I'm writing an unhandled exception handler. I have a vague recollection from my kernel days that it was bad to catch an EXCEPTION_GUARD_PAGE, as this was generated to tell the OS to enlarge the stack. My question is twofold: Can such an exception occur in user space? If so, is it safe to catch it? I'm not especially interested in doing anything with it. I just want to know if I need to put special code in to not catch it (as I'm catching everything at the moment).

    Read the article

  • unable to catch org.hibernate.StaleObjectStateException while deleting record that doesn't exists in database

    - by JAB
    My application has a delete user option. Now in order to check concurrency condition I tried the following use case opened application in chrome and firefox browser. deleted user in firefox now trying to delete the same user in chrome browser I get exception org.hibernate.StaleObjectStateException .. which is right .. since I am trying to delete an object which doesn't exists. But I am not able to catch this exception try{ getHibernateTemplate().delete(userObj); } catch (StaleObjectStateException e) { e.printStackTrace(); } How do i catch this exception ??

    Read the article

  • Avoiding try/catch hell in my web pages

    - by Shaun_web
    I am writing an ASP.NET website, which is a new framework for me. I find that I have a try/catch block in literally every method of my codebehind. All these try/catch blocks do is catch the exception and then pop-up an error message to the user. Isn't there some sort of global error handler in ASP.NET? It's worth noting that my error handling is within control (ASCX) pages, and I would like a way to simply get each ASCX to handle its own errors without forcing all error handling just to a single master page or a redirect...

    Read the article

  • Can I catch bad pointer errors in C++?

    - by Simon
    Hi there, I was wondering if there is a possibility to catch errors like this in C++: object* p = new object; delete p; delete p; //this would cause an error, can I catch this? Can I check if the pointer is valid? Can I catch some exception? I know I could set the pointer p to NULL after the first object deletion. But just imagine you wouldn't do that. I am using VC++ with Visual Studio 2008/2010. Thank you

    Read the article

  • Idea for doing almost same work in both catch & finally(C#3.0)

    - by Newbie
    I have a requirement. I am processing some files and after the processing are done I am archiving those files into an archive folder with timestamp appended. The file archiving and putting time stamp portion I am doing in the Finally block. Now a new requirement has come where I need to mail if something wrong goes in the original files and then I need to archive the same. Now this piece of code I need to handle in the catch block. But if I write the code entirely in the catch block, then it will fire only if there is an exception; otherwise not. So basically I am writing the same pice of code in both the catch and finally block. What is the standard and recommended approach you people think will be better in this case? I am using C#3.0 Thanks.

    Read the article

  • Local variable and Try/Catch

    - by 3D-kreativ
    I get an error, a red line below the variable intAge in the if-statement in the code. It says the variable is local, but how could it be local when it is declared in the beginning of the code? Does it have to do with the Try/Catch part? The reason why my code looks like it does, is just beacuse I have to use a Try/Catch in the code for this task. Preciate some suggestions to solve this in a similiar and correct way? Thanks! int intAge; try { intAge = int.Parse(age); } catch (Exception) { MessageBox.Show("Enter an age in numbers!","Error!"); } finally { } // Check input if (intAge < 1) { inputOk = false; errorMessage = "Please enter 1 or higher!"; }

    Read the article

  • Catch a generic exception in Java?

    - by Alex Baranosky
    We use JUnit 3 at work and there is no ExpectedException annotation. I wanted to add a utility to our code to wrap this: try { someCode(); fail("some error message"); } catch (SomeSpecificExceptionType ex) { } So I tried this: public static class ExpectedExceptionUtility { public static <T extends Exception> void checkForExpectedException(String message, ExpectedExceptionBlock<T> block) { try { block.exceptionThrowingCode(); fail(message); } catch (T ex) { } } } However, Java cannot use generic exception types in a catch block, I think. How can I do something like this, working around the Java limitation? Is there a way to check that the ex variable is of type T?

    Read the article

  • Try-Catch or Check Length? C# XNA

    - by Shaded
    I was just wondering which would be cheaper, using a try catch block for index out of bounds or checking the length of a multi dimensional array and comparing values? I have a feeling it's the length, since I can store the length in a variable and then just do if's which are relatively cheap. I'm just not sure how expensive try-catch is. Thanks!

    Read the article

  • Java force catch RuntimeException?

    - by wuntee
    Is it possible to force java to make you catch RuntimeExceptions? Specifically I am working with the Spring framework and the whole Exception hierarchy is based upon RuntimeExceptions. A lot of the times I forget to try and catch the Exceptions. A specific example is when doing an LDAP query, or an SQL call.

    Read the article

  • c++ try catch practices

    - by Tony
    Is this considered good programming practise in C++: try { // some code } catch(someException) { // do something } catch (...) { // left empty <-- Good Practise??? }

    Read the article

  • How to catch an exception and email information about it in liferay portlet

    - by heikkim
    I have a custom portlet made for liferay and sometimes it throws an exception. Why it throws exceptions is irrelevant. How to catch exceptions thrown by portlet handler methods in order to email information about them? I know I could do try catching on every handler method but it would be a much more elegant and cleaner solution to catch the exception on a higher level and just email some information about the error. I'm using Spring Portlet MVC, so i got all spring-related niceties at hand.

    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

  • Return in catch block?

    - by lowlyintern
    Is is wrong to have a return statement in a catch block? What are the alternatives? i.e: public bool SomeFunction() { try { //somecode return true; } catch(Exception ex) { MessageBox.Show(ex.message); return false; } }

    Read the article

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