Catch exceptions out of catch block

Hello,
Here in my job we was using Log4J , but since some of our logs need complex things like replication for
some databases analise log t see where we will send in and lots of emails too , so we are developing our own log framework, my question is , there is a way to caught exceptions not declared in a try catch block?
Example: IndexOutOfBound some time are not cought in a try catch block, or some files sometimes came null and throws uncauht exceptions some times, there is a way to me listen to all execptions wich was throwed to the system and have a no catch block??
Thank You
Ricardo

When an uncaught exception occurs, the JAVA runtime system determins the ThreadGroup of the current thread and calls "uncaughtException" on that ThreadGroup object. However, the java.lang.ThreadGroup object performs the printing of the stack trace, which you will normally see in such cases.
If you want to modify this behaviour, you could write your own ThreadGroup class, which extends java.lang.ThreadGroup and provides a different implementation of uncaughtException. E.g. you could write a log message to your own log file or whatever you want.
Now you must guarantee, that all threads in your system are childs of that customized ThreadGroup. I did this in my main class:
public class Application implements Runnable {
    private String[] argv;
    public static void main(String[] argv) {
        this.argv = argv; // save this for use in the run method
        ThreadGroup tg = new MyThreadGroup();
        // start a thread in the new thread group and terminate the original main thread
        new Thread(tg, this, "main").start();
    public void run() {
        // perform all other tasks here
public class MyThreadGroup extends ThreadGroup {
    public MyThreadGroup()  {
        super("MyThreadGroup");
    public void uncaughtException(Thread thread, Throwable exception) {
        // ignore death of thread
        if (exception instanceof ThreadDeath)
            return;
        // ---- perform your actions here ----
}All other threads, which are created later, are also in the new thread group, because they inherit the group from their creator.

Similar Messages

  • Return in finally block hides exception in catch block

    Hi,
    if the line marked with "!!!" is commented out, the re-thrown exception is not seen by the caller (because of the return in the finally block). If the line is commented in, it works as I would expect. Is this is bug or a feature? I assume the return removes the call to troubleMaker() from the call stack - including the associated exception...
    Christian Treber
    [email protected]
    public class ExceptionDemo extends TestCase
    public void testException()
    String lResult = "[not set]";
    try
    lResult = troubleMaker();
    System.out.println("No exception from troubleMaker()");
    } catch(Exception e)
    System.out.println("Caught an exception from troubleMaker(): " + e);
    System.out.println("Result: " + lResult);
    public String troubleMaker()
    boolean lErrorP = false;
    try
    if(6 > 5)
    throw new RuntimeException("Initial exception");
    return "normal";
    } catch (RuntimeException e)
    System.out.println("Caught runtime exception " + e);
    lErrorP = true;
    throw new RuntimeException("Exception within catch");
    } finally
    System.out.println("Finally! Error: " + lErrorP);
    if(!lErrorP)
    return "finally";

    This is specified in the Java Language Specification, section 14.19.2 .
    -- quote
    If execution of the try block completes abruptly because of a throw of a value V, then there is a choice:
    * If the run-time type of V is assignable to the parameter of any catch clause of the try statement, then the first (leftmost) such catch clause is selected. The value V is assigned to the parameter of the selected catch clause, and the Block of that catch clause is executed. Then there is a choice:
    o If the catch block completes normally, then the finally block is executed. Then there is a choice:
    + If the finally block completes abruptly for any reason, then the try statement completes abruptly for the same reason.
    -- end quote
    "completing abruptly" (in this instance) means a throw or a return, as specified in section 14.1
    Ok? It's not a bug, it's the defined behaviour of the language. And when you think about it, this behaviour gives you the option to do what you want in your finally block.

  • RAISERROR with Try/Catch does not exit after exception in catch block

    I am trying to propogate an error from within my proc out to the caller.
    In the attached example I have 2 sets of try catch blocks.
    I raiserror in the first
    catch the error and then raiserror again. (I expect to exit)
    I do not expect :
    to get to print 'post test'
    to get to second try block.
    but this does not exit, instead the code flows as per 2 runs.
    I do not understand the reason for the flows, as it seems counterintuitive to be raising an error but then still print following exceptions. I cannot seem to find any references that explains this behaviour.
     running tests together results
    print '-------------------------------------------------------'
    print 'test 15'
    exec test_raiseerror 15
    print '-------------------------------------------------------'
    print 'test 16'
    exec test_raiseerror 16
    print '-------------------------------------------------------'
    print 'test 17'
    exec test_raiseerror 17
    print '-------------------------------------------------------'
    print 'test 18'
    exec test_raiseerror 18
    print '-------------------------------------------------------'
    'RESULTS'
    test 15
    error number provided: 15
    Msg 50000, Level 15, State 1, Procedure test_raiseerror, Line 21
    name hello 15
    post test
    15
    Msg 50000, Level 15, State 1, Procedure test_raiseerror, Line 37
    name hello 2 15
    post test2
    test 16
    error number provided: 16
    Msg 50000, Level 16, State 1, Procedure test_raiseerror, Line 21
    name hello 16
    post test
    16
    Msg 50000, Level 16, State 1, Procedure test_raiseerror, Line 37
    name hello 2 16
    post test2
    test 17
    error number provided: 17
    post test
    17
    post test2
    test 18
    error number provided: 18
    post test
    18
    post test2
    Msg 50000, Level 17, State 1, Procedure test_raiseerror, Line 21
    name hello 17
    Msg 50000, Level 17, State 1, Procedure test_raiseerror, Line 37
    name hello 2 17
    Msg 50000, Level 18, State 1, Procedure test_raiseerror, Line 21
    name hello 18
    Msg 50000, Level 18, State 1, Procedure test_raiseerror, Line 37
    name hello 2 18
    run tests seperately
    exec test_raiseerror 15
    error number provided: 15
    RESULTS 15
    Msg 50000, Level 15, State 1, Procedure test_raiseerror, Line 21
    name hello 15
    post test
    15
    Msg 50000, Level 15, State 1, Procedure test_raiseerror, Line 37
    name hello 2 15
    post test2
    exec test_raiseerror 16
    RESULTS 16
    error number provided: 16
    Msg 50000, Level 16, State 1, Procedure test_raiseerror, Line 21
    name hello 16
    post test
    16
    Msg 50000, Level 16, State 1, Procedure test_raiseerror, Line 37
    name hello 2 16
    post test2
    exec test_raiseerror 17
    RESULTS 17
    error number provided: 17
    post test
    17
    post test2
    Msg 50000, Level 17, State 1, Procedure test_raiseerror, Line 21
    name hello 17
    Msg 50000, Level 17, State 1, Procedure test_raiseerror, Line 37
    name hello 2 17
    exec test_raiseerror 18
    RESULTS 18
    error number provided: 18
    post test
    18
    post test2
    Msg 50000, Level 18, State 1, Procedure test_raiseerror, Line 21
    name hello 18
    Msg 50000, Level 18, State 1, Procedure test_raiseerror, Line 37
    name hello 2 18
     CODEBLOCK:
    if object_id('test_raiseerror','P') is not null
    drop proc test_raiseerror
    go
    create proc test_raiseerror(@id as int) as
    begin
    begin try
    declare @name varchar(20)
    select @name = 'hello'
    raiserror('name %s %d',@id,1,@name,@id)
    print 'next'
    end try
    begin catch
    declare @errormessage nvarchar(4000)
    declare @errornum int
    select @errormessage = error_message()
    , @errornum = error_severity()
    print 'error number provided: ' + convert(varchar(2),@errornum)
    raiserror(@errormessage, @errornum,1)
    print 'post test'
    end catch
    begin try
    select @name = 'hello 2'
    raiserror('name %s %d', @id,1,@name, @id)
    end try
    begin catch
    select @errormessage = error_message()
    , @errornum = error_severity()
    print @errornum
    raiserror(@errormessage, @errornum,1)
    print 'post test2'
    end catch
    end
    go
    sqlserver 2008 & 2008 R2

    There is a Connect that describes a similiar complaint.  But basically a raiserror inside a catch block does not terminate the procedure, it will continue with any additional code in the CATCH and FINALLY unless it hits a return statement.
    http://connect.microsoft.com/SQLServer/feedback/details/275308/have-raiserror-work-with-xact-abort

  • Try-catch blocks.  How do you get variables out?

    Hey guys,
    I have several try-catch blocks around potential NumberFormatException's. Well the variables and values given inside the try-catch block can not be used outisde, so how do i get them out or use them outside this block.
    Is there a way to kind of pass it out, or to take the variable outside the try-catch block?
    Gary.

    Declare the variable before the try block:
    public void foo(String number) {
    int i; // Unknown
    try {
    i = Integer.parseInt(number);
    } catch( NumberFormatException e ) {
    e.printStackTrace();
    System.out.println(i);
    variable i might not have been initialized
                   System.out.println(i);
                                      ^
    Or declare the method as throwing the exception so
    that you don't have to handle it directly
    public void foo(String number)
    throws NumberFormatException
    i = Integer.parseInt(number);
    System.out.println(i);
    }Not the best example, in this case. But it works for some things.
    Or make use of the variable within the try block so
    that you limit its scope to the degree possible
    public void foo(String number) {
    try {
    i = Integer.parseInt(number);
    System.out.println(i);
    } catch( NumberFormatException e ) {
    e.printStackTraceException();
    }Definitely missed declaring i, but I like this one best ;~)
    Each has its benefits. Depends what sort of method
    you're writing - if failure of the try block causes
    the whole method to fail, don't try to handle the
    exception locally, put the throws in the signature. ~Cheers

  • How to get details about Exception catched in Exception branch of the Block

    Hello Experts,
    Is it possible to get details about Exception catched in Exception branch of the Block in Integration Process (BPM)?
    In the Exception branch System Error is catched, but from time to time different type of System Errors are happening during sync call to WebService - Connection Timeout, Connection Refused, UnknownHost, etc.
    So the task is somehow to map the type of System Error to the response. I was trying to create a mapping using as source the message which is coming from the Adapter after the sync call, but the mapping is failing with "No Source Payload" error.
    Maybe the description is somewhere in Header or Dynamic configuration?
    Or it is possible to access it somehow with JAVA-maping?
    Thanks for your help!

    Hey,
          the message from the exception can be utilized by using alerts(in order to mail,sms r fax). but otherwise its not possible using mappings or container.
    check this link for alert configuration.
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step

  • Exception Handling In BPEL  By using Catch Blocks or Fault Policies Or Both

    I have a confusion regarding
    Exception handling :
    When Should i go for 1)Catch Block (Remote , or binding ) in bpel for exception handling .
    2)Fault Policy , Fault binding.xml
    Currently iam using catch blocks , but even fault policy is good , but can i use both...
    Currently in My bpel ,when any error occurs i have to send a error notification by Email .
    Currently i have exposed the email service which shuts emails and write a file with errored Message.
    Hence if any error i will catch i in a parent BPEL, i will just invoke the above email, service .
    So anybody can help me by giving the suggestion how to go for the best approach
    Edited by: anantwag on Mar 23, 2011 6:31 AM

    Currently in My bpel ,when any error occurs i have to send a error notification by Email .
    Currently i have exposed the email service which shuts emails and write a file with errored Message.Seeing your use case I will suggest you to use fault handling framework (fault policy). Fault handling framework should be used where you need generic error handling framework which handles all the faults occured in any composite component. Generally BPEL catch block should be used to propagate error info/fault back to the client/to fault handling framework or to consume an error
    Regards,
    Anuj

  • Use catch block to do something other than handling exception?

    Hello,
    I have always been under the impression that the catch block should only handle the exception thrown by the try block?
    But now I'm reading a class where it's more or less used as an else if. Of course this works well, but I don't like it.
    What is your view of this? A little example:
    FileReader fR = null;
    try{
          fR = new FileReader("file1")
    catch (Exception e){
         //If file1 didn't exist try if file2 exists
         try{
             fR = new FileReader("file2")
         catch (Exception ee){
    }I think it should be rewritten not using this technique?

    Farmor wrote:
    Hello,
    I have always been under the impression that the catch block should only handle the exception thrown by the try block?
    But now I'm reading a class where it's more or less used as an else if. Of course this works well, but I don't like it.
    What is your view of this? A little example:
    FileReader fR = null;
    try{
    fR = new FileReader("file1")
    catch (Exception e){
    //If file1 didn't exist try if file2 exists
    try{
    fR = new FileReader("file2")
    catch (Exception ee){
    }I think it should be rewritten not using this technique?There's nothing really wrong with the code you posted, but I find it ugly to write additional non-error-handling code inside nested try-catches. What happens if you want to extend this logic to 3 or 4 files? If the code could be written to avoid it, as someone else showed, I'd prefer the other way.
    I'd put the file names in an array, and loop over the array until I found one I could open.

  • [svn:bz-trunk] 8964: Fix LCDS-953 - Add a last ditch catch block to the service() function to avoid any possibility or leaking exception info.

    Revision: 8964
    Author:   [email protected]
    Date:     2009-07-31 12:07:09 -0700 (Fri, 31 Jul 2009)
    Log Message:
    Fix LCDS-953 - Add a last ditch catch block to the service() function to avoid any possibility or leaking exception info.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/LCDS-953
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/MessageBrokerServlet.java

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • Handling multiple exceptions with a single catch block

    In the following code:
    try{
    catch (NumberFormatException a) {
    catch (UserDefinedException b) {
    The code for both catch blocks are identical. Is there no way I can combine these into one block?
    For example, could I not do:
    catch ( (NumberFormatException a) || (UserDefinedException b) ){
    or anything similar?
    I did think of:
    try{
    try{
    catch (NumberFormatException a) {
    throw new UserDefinedException("");
    catch (UserDefinedException b){
    but this just seems to be a waste of code. Any ideas?

    I would use the fundamental way to combine identical sections of code--put the code in a new method:
        try {
        catch (NumberFormatException a) {
          myExceptionHandlingMethod(a);
        catch (UserDefinedException b) {
          myExceptionHandlingMethod(b);
      private void myExceptionHandlingMethod(Throwable t) {
      }

  • How to get the returned error messages in the Try/Catch block in DS 3.0?

    A customer sent me the following questions when he tried to implement custom error handling in DS 3.0. I could only find the function "smtp_to" can return the last few lines of trace or error log file but this is not what he wants. Does anyone know the answers? Thanks!
    I am trying to implement the Try/Catch for error handling, but I have
    hard time to get the return the msg from DI, so I can write it to out
    custom log table.
    Can you tell me or point me to sample code that can do this, also, can
    you tell me which tables capture these info if I want to query it from
    DI system tables

    Hi Larry,
    In Data Services XI 3.1 (GAd yesterday) we made several enhancements for our Try/Catch blocks. One of them is the additional of functions to get details on the error that was catched :
    - error_message() Returns the error message of the caught exception
    - error_number() Returns the error number of the caught exception
    - error_timestamp() Returns the timestamp of the caught exception.
    - error_context() Returns the context of the caught exception. For example, "|Session Datapreview_job|Dataflow debug_DataFlow|Transform Debug"
    In previous versions, the only thing you could do was in the mail_to function specify the number of lines you want to include from the error_log, which would send the error_log details in the body of the mail.
    Thanks,
    Ben.

  • Return statement in catch block !

    Hello Java Gurus,
    The code is not compiling when i remove return from the catch block
    i dont really understand the essence of return statement in catch block
    any help is greatly appreciated !
    Thanks in advance !
    import java.io.*;
    public class fileinputstream  {
       public static void main(String arg[]) {
            FileInputStream fin ;
            FileOutputStream fout;
           try  {
                 fin =new     FileInputStream("input_file.txt");
                 int bytes_av = fin.available();
                 System.out.println("bytes available the input file "+bytes_av);
           catch(FileNotFoundException e)
               System.out.println("The input file is not present");
               return;
           catch(IOException e)
               System.out.println("error while giving bytes available the input file");
               return;
           try
                     fout =new FileOutputStream("output_file.txt");
           catch(FileNotFoundException e)
               System.out.println("The output file cannot be created");
               return;
           int data=0;
           try  {
               data =(int)fin.read();
           catch(IOException e) {
               System.out.println("Exception while reading from file");
            while(-1!=data)      {
                       try
                       fout.write(data);
                       catch(IOException e)
                           System.out.println("Error while writing to file");
                       try
                           data =(int)fin.read();
                       catch(IOException e)
                           System.out.println("Exception while reading from file");
            try  {
                   fin.close();
                   fout.close();
            catch(IOException e)  {
               System.out.println("Error while closing files");
    }

    You do understand what "return" means, don't you? It
    exits the method, main() in this case.
    So the return statements in the catch blocks end the
    program. If you remove the return statements, the
    program will continue with the code after the catch
    blocks. It needs the variables "fout" and "fin"
    there, and these must be initialised.
    If there are no return statements in the catch
    blocks, the variables "fin" and "fout" will be not
    initialized when you get to the code that uses them,
    and that's an error. The java compiler is telling you
    that you must always initialise the variables (you
    can set them to "null", for example).Great explanation !!!
    Thanks !

  • Return statement at the end of try or after catch blocks

    Hi
    Can anyone tell me which is the better practice - to put the return statement at the end of try block or after all the catch blocks ie at the end of method.
    Eg
    Method A()
    String str;
    try{
    str= [some code]
    return str
    catch(Exception e)
    System.out.println("Exception");
    } // end of method
    OR
    Method B()
    String str;
    try{
    str= [some code]
    }catch(Exception e)
    System.out.println("Exception");
    return str
    } // end of method

    I always try to work with only one exit point for each method.
    For readability I always put the return statement as close to the end of the method as possible.
    In this particular question,
    I think you should put the return at the end of the method (for readability, since this is what you are
    familiar with), but when I have a try-catch clause, I usually have an unrecoverable error and
    should throw this further down the tree, so it usually becomes
    try{
       return   
    }catch(...){
       // write out some logging information
       rethrow exception or throw another exception
    }I think you should NEVER reflect the occurence of an error in the return-value of the
    method when an unrecoverable exception occurs. Just rethrow this exception or throw another method.
    Other methods look like
       Object result = new...
       return result;As for the specific case of a repetitive if-case:
    This is possible in two versions:
    With one return and a result-object
    Object result = new ...
    if(..)
       result = ...
    else if(..)
       result = ...
    return result;With every time a return
    if(...)
       return ...;
    else if(...)
       return ...;For me the above two possibilities make no difference,
    but I find the second version (which I hated when I began programming)
    to be somewhat more of a (self-made) standard nowadays.
    But I do not think this particular case makes much of a difference.
    kind regards,

  • Performance impact on using too much try catch block

    I have several questions here:
    1. The system that I'm developing requires to be high performance, but I am not sure how will try catch block affect overall performance.
    2. I wanted to know which would be more efficient (result in faster processing)
    Have several generic try catch OR catch all exceptions individually?
    ex:
    try {
    } catch (Exception e){
    }vs.
    try{
    } catch (MalformedUrlException me){
    } catch(SQLException){
    }3. Which one would be faster, one big try catch block or several small try catch blocks?
    ex.
    try{
    //read from io file
    //query database
    //parse data
    //write to file
    //query database again
    } catch(Exception e){
    //log exception
    }vs.
    try{
    //read from io file
    } catch(FileNotFoundException fnfe){
    //log exception
    try{
    //query database
    }catch(SQLException se){
    //log exception
    try{
    //parse data
    }catch(SaxParserException saxe){
    //log exception
    try{
    //query database again
    }catch(SQLException se2){
    //log exception
    try{
    //write to file
    } catch(FileNotFoundException fnfe){
    //log exception

    1. The system that I'm developing requires to be high performance, but I am not sure how will try catch block affect overall performance.Compared to what? You can't write an equivalent program that doesn't have a try-catch block, so the answer would have to be that it doesn't affect performance at all.
    2. I wanted to know which would be more efficient (result in faster processing)Have several generic try catch OR catch all exceptions individually?
    You still have it backwards. Do you need to do different things for different exceptions? If so, then that's what you have to do and there is no other code that might be "faster".
    Here's what you should do. Write the code that needs to be written. Don't leave out necessary stuff because of performance reasons. (If you left out all your code, the program would run much faster.) Then find out which parts of the program ACTUALLY take the most time and work on speeding them up.

  • Wrong catch block is reach

    Hi,
    I encounter a strange behaviour in exception handling.
    My web app can generate pdf files, and download them. If client closes its browser window, a ClientAbortException is thrown (which is expected behaviour, I guess.)
    However, I can't catch it correctly. Here is my code:
    try {
        // code for generating PDF and downloading it through response output stream.
    catch(ClientAbortException caEx) {
        // No specific error handling required
        logger.info("Request aborted by client ["+caEx.getClass()+"] ["+caEx.getMessage()+"]", caEx);
        return "PDF_ERROR";
    catch(Exception ex) {
        // A problem occured (TODO notify administrator)
        logger.info("PDF generation failed ["+ex.getClass()+"] ["+ex.getMessage()+"]", ex);
        return "PDF_ERROR";
    }The problem is that even in case of ClientAbortException, the exception is caught by the second catch block, and log is:
    PDF generation failed [class org.apache.catalina.connector.ClientAbortException] [null]
    As you can see, Class name is the same. I tried debugging by adding the following logs in the second catch block:logger.info("instanceof ? "+ (ex instanceof ClientAbortException));
    logger.info("class ? "+ (ex.getClass() == ClientAbortException.class));But both logged false.
    Could someone explain why it can happen?

    1) The fully qualified name of ClientAbortException from your class is indeed org.apache.catalina.connector.ClientAbortException. i.e., you are not importing some other ClientAbortException (that lives in a different package). You may want to print out exact class name by ClientAbortException.class.getName() or change the catch block as
    catch (org.apache.catalina.connector.ClientAbortException caEx)
    just to be sure.
    2) If you get the situation even after verifying the fully qualified class name, then you may want to check whether these are loaded by the same loader or not. You may add the following lines:
    logger.info("name equals? "+ (ex.getClass().getName().equals(ClientAbortException.class.getName());
    logger.info("same loader ? "+ (ex.getClass().getClassLoader() == ClientAbortException.class.getClassLoader()));
    if you get true and false respectively, then the what is seen is correct -- a class uniquely identified by fully qualified class name and the class loader that loaded it.

  • Trivial Catch block question

    In a test harness I wanted to put some debugging output to System.out and keep one line per thread execution so I could read it more easily.
    I have a try catch block, and in both sections my debugging prints out with System.out.print, so they should appear on the same line. The strange thing I have noticed is that when ever the catch block is entered the code prints on a new line and I dont know why.
    Below is a snippet of code, its pretty simple but illustrates this:
    try {
       System.out.println("starting test - ");
       //at this line the test code runs
       System.out.println("success");  
    } catch(Exception e) {
       System.out.println("fail");
    }The output for a successful test is like:
    starting test success
    And for a fail:
    starting test -
    fail
    I am just curious to know the answer, its like a new line character is output when the print statement is within the try catch block.

    MarksmanKen wrote:
    You want to use System.out.print not System.out.println
    Notice the difference?
    One automatically starts a new line and one just carrys on the current line.Wrong: One automatically ends the current line, while the other one does not!
    A subtle difference, but important:
    This code will print "foo" and "bar" on two separate lines:
    System.out.println("foo");
    System.out.print("bar");This code will print "foobar" on one line:
    System.out.print("foo");
    System.out.println("bar");

Maybe you are looking for

  • Adobe PS CS on new computer

    Old PC crashed with Adobe PS CS installed.  I don't have original disc any longer but have serial #.  Where do I download Adobe PS CS on my new PC with valid serial number?

  • Linked Smart Object:  Allowed File Type and Editor

    Please forgive my lack of knowledge.  I'm evaluating PS CC 2014, own PS 5.1 and am a hair shy of being a novice.  Presently I'm doing Photomerge Focus Stacking.  What I'm hoping is that DNG files can be Linked Smart Objects and that I can modify the

  • Moving iTunes from one PC to three MacBook Pros - how?

    We started using Mac products because of the iPod. Each of our three family members in the household (dad, mom, and daughter) each created an iTunes account when we started; one for each iPod, however, we used dad’s Apple ID as the “master” account f

  • Could not retreive download information in App Store via Wi-Fi!

    I have a very very critical problem about downloading stuffs in App Store! The detail is when I open App Store, after loading stuffs, it said: "Could not retreive download informations, please connect to iTune." I don't care about the message, so I c

  • Error when trying to buy music

    Just tonight, when I tried to buy some songs (two different ones), I got the following error "Could not purchase SONG NAME. The requested resource was not found." After awhile of hitting the buy button, both songs eventually purchased, but I had to k