While, try/catch and continue

Hello,
i've got a while-loop which executes some statements. some of them are within a try-catch block.
imagine like this:
while (channelsIT.hasNext()) {
   RSSChannel channel = channelsIT.next();
   RSSChannelReader reader = new RSSChannelReader(channel.getStrRSSUrl());
   try {
      reader.connect();
   } catch (Exception e) {
      log.error("Fehler beim Lesen eines RSS-Channels", e);
      continue;
   Collection items = reader.getChannelItems();
}As you may see, it makes no sense in this case to continue the loop after reader.connect() failed. for that, I tried to use the continue statement, but the code interrupts after the logging and the application failes.
the workaround is to put all the code of the while loop into the try-block, but for that seems to be a bad solution.
while (channelsIT.hasNext()) {
   RSSChannel channel = channelsIT.next();
   RSSChannelReader reader = new RSSChannelReader(channel.getStrRSSUrl());
   try {
      reader.connect();               
      Collection items = reader.getChannelItems();
   } catch (Exception e) {
      log.error("Fehler beim Lesen eines RSS-Channels", e);
      continue;
}so why does my first code not work properly?
Thank you for any suggestions.

Then I misunderstood you.
public class Test {
  public static void main(String args[]) {
    int i = -1;
    while (i < 10) {
      int j = i % 2;
      i++;
      try {
        System.out.print(i / j);
      } catch (Exception e) {
        System.out.println(i + " skipped");
        continue;
      System.out.println(" - after");
}This writes "after" if there's no exception and skipped if there is one:
0 - after
1 skipped
2 - after
3 skipped
4 - after
5 skipped
6 - after
7 skipped
8 - after
9 skipped
10 - after
So it behaves exactly as you want it to, and so should your first code. Is it the exact code you posted, including "catch (Exception"?

Similar Messages

  • Try/catch and 'cannot resolve symbol'

    I am relatively new to java programming and something has me puzzled...
    Why do I get a 'cannot resolve symbol' message when I include a variable definition in a try/catch section. When I put it/them before the 'try' statement it compiles as expected. How are statements inside a try compiled differently than those outside?
    try {
        StringBuffer pageBuffer = new StringBuffer();
        String inputLine;
        BufferedReader in = new BufferedReader(
           new InputStreamReader( theURL.openStream() ) );
        while ((inputLine = in.readLine()) != null) {
             System.out.println(inputLine);
            pageBuffer.append(inputLine);
        in.close();
    } catch (Exception ignored) {}C:\Projects\WebExplorer\PageVisitor.java:142: cannot resolve symbol
    symbol : variable pageBuffer
    location: class PageVisitor
         return pageBuffer.toString();
    Paul

    A try block is just like any other block delimited by {...} in that all variables declared inside it are local to that block. I.e. they are not visible or usable anywhere outside it. Your pageBuffer variable, for example, is a local variable that can only be used inside the try-block in which it is declared.
    Your obvious solution, knowing that, is to declare the variables outside the try and catch blocks. Remember to initialize them (even to null), otherwise the compiler will complain about variables that may not have been initialized.

  • Try catch and finally

    Finally block should executed whether try goes successfully or the program goes to catch.
    Am I right?
    I have this kind of code here using BEA WLS:
         * @jpf:action
         * @jpf:forward name="success" path="reportView.jsp"
         * @jpf:forward name="error" path="../error.jsp"
        protected Forward viewReport(ViewReportForm vrForm)
            try{
                return new Forward("success");
            catch(Exception e){
                log.error(this,e);
                e.printStackTrace();
                getRequest().setAttribute("errorMessage",e.getMessage());
                return new Forward("error");
            finally
                try
                    if (conn!=null)
                        conn.close();
                    if (rs!=null){
                        rs.close();
                    if (stmt!=null)
                        stmt.close();
                    conn=null;
                    rs=null;
                    stmt=null;
                    array=null;
                    params=null;
                    query=null;
                    q_where_pp=null;
                    html=null;
                    *System.out.println("Testing finally block");*
                catch(Exception e)
                    log.error(e);
                    e.printStackTrace();
        }Note that I put System.out.println("Testing finally block"); to test whether finally block gets executed.
    When try goes fine which is return to page reportView.jsp the finally will be executed.
    But when it goes wrong which goes to error.jsp the finally block never print out the sentence.
    Which make me confuse, why finally block never executed after catch block.
    Anyone could help me?

    pramudya81 wrote:
    finally
    try
    if (conn!=null)
    conn.close();
    if (rs!=null){
    rs.close();
    if (stmt!=null)
    stmt.close();
    conn=null;
    rs=null;
    stmt=null;
    array=null;
    params=null;
    query=null;
    q_where_pp=null;
    html=null;
    *System.out.println("Testing finally block");*
    catch(Exception e)
    log.error(e);
    e.printStackTrace();
    First of all, your finally is after a bunch of statements, so if any of those statements throw an exception, your println() will never be executed. Finally does not mean that everything in the finally block gets executed even if they throw exceptions, it means execution will begin in the finally block before leaving the method try/catch.
    Second, closing connections, result sets, and statements can all throw exceptions (you know this because you put a try/catch block around it). And they're pretty much guaranteed to throw an exception in this case: Closing a connection closes all the statements associated with it (and closing a statement will close the resultset associated with it). So when you try to close the resultset, it's already closed. This should've showed up in your logs. You need to re-order your closes, and put each close in its own try/catch block.

  • Weird thing with try-catch

    Hey everyone, I have a problem compiling this .java
    import java.io.*;
    public class lector
        public static void main (String args[])
        public void lector()
            listapersonas listap = new listapersonas();
            listaconocidos listac = new listaconocidos();
            String linea, per, con;
            persona nuevapersona,actual,nuevoconocido;
            BufferedReader texto = new BufferedReader(new FileReader("conocidos.txt"));
            linea="";
            try {
            while ((linea=texto.readLine())!=null)
                per = linea.substring(0,linea.indexOf(','));
                con = linea.substring(linea.indexOf(','));
                nuevapersona = new persona(per);
                nuevoconocido = new persona(con);
                if (listap.existe(per)==false)
                    nuevapersona.conocidos.agregar(nuevoconocido);
                    listap.agregar(nuevapersona);
                    linea=texto.readLine();
                    continue;
                if (listap.existe(per)==true)
                    if (listac.existe(con)==false)
                        listac.agregar(nuevoconocido);
                    else
                        linea=texto.readLine();
                        continue;
                else
                    linea=texto.readLine();
                    continue;
            }  //while
            } //try
            catch (java.io.* e)
                System.out.print("Imposible leer el archivo");
            } //catch
        } //lector
    } // classWell what it is supposed to do is read a string from a file and then transform and add them to a linked list.
    The problem is that when I compile there is an error message called "<identifier> expected" and points to the catch block. Please help me

    Nothing weird about it at all.
    That's not the syntax of a catch block. What you've written there will only work in an import statement.
    What you probably mean to catch is java.io.IOException.

  • Yet another Try Catch question. Iterating through a ForEach loop

    Confused on error handling in a Powershell ForEach loop. I’m looping through a list of registry keys, attempting
     to open each one. If it succeeds, I do a bunch of stuff. If it fails, I want to skip to the next iteration.
    If I was doing It in VBScript I’d do this:
    For Each Thing In colThings
    Open Thing
    If Err.Number <> 0 Then
    “oops”
    Else
    Do stuff
    Do stuff
    Do stuff
    End If
    Next
    This is what I came up with in PowerShell. It seems to work, but just doesn’t seem powershell-ish. There must be a better way to use the catch output than just creating a $return variable and assigning it success or fail?
    ForEach ($subKeyName in $subKeyNames)
    try{$subKey = $baseKey.OpenSubKey("$subKeyName")}
    catch{$return = "error" }
    If($return -eq "error" )
    “Oops”
    Else
    Do stuff
    Do stuff
    Do Stuff

     
    I totally get what you're saying about formatting. I don't' have any habits yet, since I've only been working in Powershell since... well, what time is it now?
    Unfortunately, It Has Been Decreed that we are no longer to use VBScript for any engineering solutions at work, so my 15 years experience in it now needs to be transitioned over asap. I don't have the luxury of crawling before I run. I'm trying not to be
    frustrated, but it's like an English major waking up one day and being told "You must now speak French exclusively. Here's a book."
    The Do Stuff example of my ForEach loop is about 50 lines of code involving matching values in subkeys of this registry key with another and collecting output. I tried wrapping the whole thing in a try section based on some examples, but it seemed odd, that's
    why I'm asking. I'm used to tightly focused error handling at the point where an error may occur.
    In this example I'm only interested in whether or not I can open the subkey (it exists, but I may not have permission). If I can't, there's no point in continuing with this iteration of the loop, I want to skip to the next one. So why include all the "Do
    Stuff" in the the try section? From a readability viewpoint, it doesn't seem helpful.
    Also, there may be more error handling deeper in the code. If I then put that in a try/catch, and then something else inside that, now I have nested try/catches mixed in with nested if/elses, all wrapped in a For loop.
    Again, I can see how it works logically, but for readability not so much, and having all these braces 50 lines apart to match up is giving me eye strain :).
    It sounds like David is agreeing with jrv, that putting the entire ForEach loop code into a try/catch is the conventional way to do it. I guess it makes as much sense as putting it all in an If-else-Endif, and I just need to adjust my paradigm.
    But if not, my specific question was more along the lines of, is there a built in way to tell that the catch section has been executed, rather than me using it to populate an arbitrary variable and then read it? In VBScript, you execute something, and the
    next line, you check the Err.number. I wasn't sure if you could do that with a try/catch.

  • PowerShell - Remote Sessions, Try{}Catch{}, ErrorActionPreference

    Hello everyone,
    I am encountering issues with Remote Exchange sessions and was wondering what I am overlooking/over-complicating.
    I am running Windows 8.1/PowerShell 4.0. Reason I mention this is because of this blog post:
    http://blogs.msdn.com/b/powershell/archive/2013/10/25/windows-management-framework-4-0-is-now-available.aspx
    The IMPORTANT section noted that Exchange 2007, 2010, 2013 are not compatible with WMF 4.0 and didn't know if that is good/bad since the OS is using PowerShell 4.0.
    1 - I am connecting to Office 365 utilizing the following:
    http://help.outlook.com/en-us/140/cc952755.aspx
    2 - I have the following function:
    function Get-SomeMailboxStatistics {
    [CmdletBinding()]
    param(
    [Parameter(Mandatory=$True,
    ValueFromPipeline=$True,
    HelpMessage="Identities or aliases to gather Exchange Statistics from.")]
    [Alias('Username')]
    [string[]]$Identity,
    [string]$ErrorLog = 'C:\MbxStatsErrorLog.txt',
    [switch]$LogErrors
    BEGIN{}
    PROCESS{
    Write-Verbose "Beginning..."
    foreach ($alias in $Identity)
    Write-Verbose "Gathering info for $alias."
    #trap [ManagementObjectNotFoundException] {$everythingOK = $false}
    Try{
    # $ErrorActionPreference = "Stop" # Testing purposes.
    $everythingOK = $true
    $gms = Get-MailboxStatistics -Identity $alias -ErrorAction Stop # http://technet.microsoft.com/library/hh847884.aspx
    # Trap {
    # throw $_
    Catch{
    $everythingOK = $false
    Write-Warning "Lookup on $alias failed."
    if ($LogErrors -eq $true){
    $alias | Out-File $ErrorLog -Append
    Write-Warning "Logged $alias to $ErrorLog."
    if ($everythingOK){
    $props = @{};
    $props = @{'Alias' = $alias;
    'DisplayName' = $gms.DisplayName;
    'TotalItemSizeInBytes' = ($gms.TotalItemSize.Value.ToString() -replace "(.*\()|,| [a-z]*\)", "");
    'TotalDeletedItemSizeInBytes' = ($gms.TotalDeletedItemSize.Value.ToString() -replace "(.*\()|,| [a-z]*\)", "");
    'MailboxType' = $gms.MailboxType; };
    $obj = New-Object -TypeName PSObject -Property $props
    Write-Output $obj
    END{}
    Example: Get-SomeMailboxStatistics -Identity GoodAlias1,GoodAlias2,FailAlias,GoodAlias3 -LogErrors -ErrorLog 'C:\Logs\MbxStatsErrors.txt' -Verbose
    The pipeline terminates on FailAlias, and then throws an error when it tries to pass the FailAlias to the $props.
    $gms | Get-Member on a good alias is:
    TypeName: Deserialized.Microsoft.Exchange.Management.MapiTasks.Presentation.MailboxStatistics
    I have tried setting $ErrorActionPreference = 'Stop' in various sections and think I am scope-creeping/not catching the Error where I should be or PowerShell is flat-out ignoring something.
    I have tried additional nested if{}else{} in the Try{}Catch{} and cannot get it to behave as expected.
    I have also tried to Trap{[ManagementObjectNotFoundException]} and Throw exception in various portions without success.
    However, setting $ErrorActionPreference = 'Stop' in the session window (from default of 'Continue') the script behaves as I expected it to, when encountering a non-existant mailbox, it logs the error. It doesn't seem to have issues executing on Windows 8.0/PowerShell
    3.0.
    I have encountered numerous blog/forum posts with no definitive answer/resolution.
    Based some of my tests around some suggestions from this thread:
    http://stackoverflow.com/questions/1142211/try-catch-does-not-seem-to-have-an-effect
    Extras:
    http://blogs.technet.com/b/heyscriptingguy/archive/2010/03/09/hey-scripting-guy-march-9-2010.aspxhttp://stackoverflow.com/questions/19553278/powershell-catch-non-terminating-errors-with-silentlycontinue
    http://stackoverflow.com/questions/15545429/erroractionpreference-and-erroraction-silentlycontinue-for-get-pssessionconfigur
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/228a3329-f564-4daa-ad70-6d869b912246/non-terminating-error-turned-into-a-terminating-error?forum=winserverpowershell

    This is not the only problem with WMF 4.0
    When you use -ErrorAction 'SilentlyContinue', $Error object is not set.
    [PS]
    $Error.Clear()
    [PS]
    $objContact =
    Get-Contact -Identity
    'CN=unknown contact,OU=Users,DC=mydomain,DC=mytopdomain'
    -ErrorAction 'Stop'
    The operation couldn't be performed because object 'mytopdomain.mydomain/Users/unknown contact' couldn't be found on 'mydc.mydomain.mytopdomain'.
        + CategoryInfo          : NotSpecified: (:) [Get-Contact], ManagementObjectNotFoundException   
    + FullyQualifiedErrorId : 482E7079,Microsoft.Exchange.Management.RecipientTasks.GetContact
        + PSComputerName        : myexchange.mydomain.mytopdomain
    [PS]
    $Error.Count
    1
    [PS]
    $Error.Clear()
    [PS]
    $objContact =
    Get-Contact -Identity
    'CN=unknown contact,OU=Users,DC=mydomain,DC=mytopdomain'
    -ErrorAction 'SilentlyContinue'
    [PS]
    $Error.Count
    0
    That's why since Exchange 2010 SP3 Rollup 5 (i suppose when reading Exchange Supportability Matrix), The Exchange Management Shell link has been updated to use Powershell 2.0
    Before 2010 SP3 Rollup 5
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"
    After 2010 SP3 Rollup 5
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -version 2.0 -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"

  • Basic (try catch finally)

    Try catch and finally were thing i recently neglected to use unless my ide made me, but i was just reading on how to use them and I have a question about something i couldn't find an answer for:
    objects you declare in try statements e.g.:
    try{
    BufferedReader br=...;
    are only available in the scope of that try statement. Is this bad programming style or would "br" be automatically destroyed after the try statement is exited?

    Well, define "dispose". If there's some method on the object that you need to call to clean that object up, you'll have to declare the variable outside the try block and then call it:
    Something it;
    try {
      it = SomethingFactory.createHeavyObject();
      it.doSomething(); // may throw Horse exception
      it.doSomethingElse();
    } catch (Horse e) {
      e.printStackTrace();
    } finally {
      it.releaseResources();
      it = null;  // only necessary if there will be a long time before "it" goes out of scope
                  // and even then maybe not if releaseResources() took care of the heavy stuff
    }On the other hand, you should never have to do this:
    Something it;
    try {
      it = new Something();
      it.doSomething(); // may throw Horse exception
    } catch (Horse e) {
      e.printStackTrace();
    } finally {
      it = null;
    }Instead you could just do:
    try {
      Something it = new Something();
      it.doSomething(); // may throw Horse exception
    } catch (Horse e) {
      e.printStackTrace();

  • How to know if a UDF form is opened else then using a TRY CATCH ?

    I'm looking for any way to find out if the UDF form is visible
    else then trying to open it in a try catch and if it's not sending a key.  This if very ugly, slow and not really my kind.
    I tried to iterate through all the forms in SBO_Application.Forms but it's not there.  All I see is the main form
    I just need to make sure the UDF form is visible when Inventory form is loaded so I can put a value in one of the UDF
    If there's a better way I'm buying it

    Hi Marc,
    Rather than putting your data in the UDF in the UDF side form, you can add a control to the main form (during the load event of the form) and bind this to the UDF through the DBDataSource that is already available on the main form. This means that you don't need to worry about whether the UDF form is open or not because you can always read or write to your UDF data from the main form.
    Alternatively, the UDF form TypeEx property is always the same as the main form but with a minus sign in front. Therefore, if you know the TypeEx and FormTypeCount of the main form then you can use the GetForm method of the Application object to get the UDF form.
    oForm = _sboApp.Forms.GetForm("-" + oMainForm.TypeEx, oMainForm.TypeCount);
    You'd still need a try/catch around this and if it raises an error then activate the 6913 menu to open the UDF form.
    Kind Regards,
    Owen

  • How to catch date errors and continue processing in a PL/SQL procedure

    I'm updating a date field with dates constructed from day, month and year fields. The incoming data has many instances of day and month that are not valid dates, ex 11 31 2007. There is no 31st day in November.
    I would like to write a pl/sql script to scan the table containing these values and log the rows that produce conversion errors.
    I thought I could do this with exceptions but there are no exceptions that correspond to the ORA-01847 error for mismatched day and month.
    Here is what I tried (the print procedure is a local wrapper for DBMS_OUTPUT.put_line):
    PROCEDURE date_check IS
    start1 DATE ;
    BEGIN
    select to_date(nvl(yearcollected,'9999') ||'/'|| nvl(monthcollected,'01') ||'/'|| nvl(daycollected,'01'),'YYYY/MM/DD'))) into start1 from incoming_data where id=1 ;
         BEGIN
              update temp_test set test_date = start1 where id=1 ;
         EXCEPTION
              WHEN OTHERS THEN
              print('Date error message from exception block');
         END;
    print('Processing continues after handling date exception') ;
    END date_check ;
    Is there a way to catch this kind of error and continue processing after logging a message?
    -=beeky

    Hi, Beeky,
    There are lots of different error messages associated with bad dates. Rather than try to catch them all, I use a BEGIN ... EXCEPTION block that contains nothing but a TO_DATE call. This is one of the rare occassions when I think "EXCEPTION WHEN OTHERS" is okay,
    The following function comes from a package. If you want to make a stand-alone function, remember to say " *CREATE OR REPLACE* FUNCTION ...".
    --          **   t o _ d t   **
    --     to_dt attempts to convert in_txt (assumed to
    --          be in the format of in_fmt_txt) to a DATE.
    --     If the conversion works, to_dt returns the DATE.
    --     If the conversion fails for any reason, to_dt returns in_err_dt.
    FUNCTION     to_dt
    (     in_txt          IN     VARCHAR2                    -- to be converted
    ,     in_fmt_txt     IN     VARCHAR2     DEFAULT     'DD-MON-YYYY'     -- optional format
    ,     in_err_dt     IN     DATE          DEFAULT     NULL
    RETURN DATE
    DETERMINISTIC
    AS
    BEGIN
         -- Try to convert in_txt to a DATE.  If it works, fine.
         RETURN     TO_DATE (in_txt, in_fmt_txt);
    EXCEPTION     -- If TO_DATE caused an error, then this is not a valid DATE: return in_err_dt
         WHEN OTHERS
         THEN
              RETURN in_err_dt;
    END     to_dt
    ;

  • While inside try/catch...

    I have this method:
    private function rewriteQueue():void {
      try{
        var file:File = File.applicationStorageDirectory.resolvePath( DATA_FILE_NAME );
        file.deleteFile();
       while (users.length) {
         var aUser:Object = users.shift();
         writeUser(aUser);
       }catch (e:Error) {
    That doesn't work and I'm just not sure why. Putting the while outside of the try/catch fixes it... but why?

    OK, I figured out why the problem was occurring. It happened when there was no file to delete - the deleteFile() failed - also causing the while to not execute. My bad.

  • Try catch problem in a while loop

    I have computerGuess set to -1 and that starts the while loop.
    but I need to catch exceptions that the user doesnt enter a string or anything other than a number between 1 and 1000.
    but computerGuess is an int so that the while loop will start and I wanted to reset computerGuess from the user input using nextInt().
    The problem is if I want to catch exceptions I have to take a string and parse it.
    import java.util.Scanner;
    public class Game {
         //initiate variables
         String computerStart = "yes";
         String correct = "correct";
         String playerStart = "no";
         int computerGuess = 500;
    public void Start()
         //setup scanner
         Scanner input = new Scanner(System.in);
         int number = (int)(Math.random()*1001);
         System.out.println(welcome());
         String firstAnswer = input.nextLine();
         if(firstAnswer.equalsIgnoreCase(computerStart)== true)
              System.out.println(computerGuess());
              //while (userAnswer.equalsIgnoreCase(correct) == false){
                   System.out.println();
         if(firstAnswer.equalsIgnoreCase(playerStart) == true)
              long startTime = System.currentTimeMillis();
              int currentGuess = -1;
              while (currentGuess != number){
              System.out.println(playerGuess());
              String guess = input.next();
              //currentGuess = Integer.parseInt(guess);
              if (currentGuess < number)
                   System.out.println("too low");
              if (currentGuess > number)
                   System.out.println("too high");
              if (currentGuess == number)
                   long endTime = System.currentTimeMillis();
                   System.out.println("Well done, the number is " + number);
              int i = -1;
              try {
                i = Integer.parseInt(guess);
                   } catch (NumberFormatException nfe) {
                        //System.out.println("Incorrect input, please try again.");
              if ( i < 0 || i > 1000 ) {
                   System.out.println("Incorrect input, please try again.");
         private String computerGuess()
               String comGuess = ("The computer will guess your number.\n" +
                        "Please enter \"too high\", \"too low\" or \"correct\" accordingly.");
               return comGuess;
         private String welcome()
              String gameWelcome = "Welcome to the guessing game \n" +
                                        "The objective is to guess a number between 1 and 1000.\n" +
                                        "You can guess the computer's number or it can guess your's.\n" +
                                        "You may enter \"quit\" at any time to exit.\n" +
                                        "Would you like the computer to do the guessing?";
              return gameWelcome;
         private String playerGuess()
              String playerWillGuess = "Guess a number between 1 and 1000.";
              return playerWillGuess;
    }The catch works , but because computerGuess is int -1 so that the while loop will run, I cannot use the input to change computerGuess because it is a string.

    the i was a mistake. and i commented on the other code, because it wasnt working at that moment. I need help understanding the try catch method.
    I want to catch any input that isn't an integer , and I would also like to catch any input that isn't a string at other parts of my program.

  • I'm having problems with 8.1 and Continuity / Handoff. It will work fine for web pages, etc. but in email when I try to do it between by iPhone 5s running 8.1 and my Macbook Pro running Yosemite I consistently get an error.

    I'm having problems with 8.1 and Continuity / Handoff. It will work fine for web pages, etc. but in email when I try to do it between by iPhone 5s running 8.1 and my Macbook Pro running Yosemite I consistently get an error. "Failed to Continue Activity" Cocoa Error 4609.  Handoff is working for phone calls and text messages. By email just crashes each time. It was also doing it under 8.0.2.  My iPhone and iPad handle this fine. It's only the MacBook to the iPhone that fails, and only on email.

    Handoff Continuity Troubleshooting

  • Error message when loading "The connection to the server was reset while the page was loading" I have to hit "try again and then it connects.

    I get the following message when trying to connect to firefox:
    "The connection to the server was reset while the page was loading." I have to click on "try again" and then it connects.

    Did you check your security software (firewall)?
    A possible cause is security software (firewall) that blocks or restricts Firefox without informing you about that, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.
    See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls

  • When trying use any Creative Cloud product on opening an application it attempts to verify my subscription "Membership Expired". I click the button "Try Again" and it says "Thank you, your Creative Cloud is now active. Click Continue to use your product."

    When trying use any Creative Cloud product on opening an application it attempts to verify my subscription "Membership Expired". I click the button "Try Again" and it says "Thank you, your Creative Cloud is now active. Click Continue to use your product." Clicking continue takes me back to the Member Expired prompt. My account and subscription are both active and current.

    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page
    If yes
    Some general information for a Cloud subscription
    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
    If no
    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Return statement and Try Catch problem

    Hi!!
    I've got the next code:
    public ResultSet DBSelectTeam(String query) {
    try {
    Statement s = con.createStatement();
    ResultSet rs = s.executeQuery(query);
    return rs;
    } catch (Exception err) {
    JOptionPane.showMessageDialog(null, "ERROR: " + err);
    But I need a return statement in the catch-block, but I don't know what's the best option.
    Help...
    Many thanks.

    The error message is: "missing return statement", Yes, I know.
    You have to either return from the catch statement, or throw from the catch statement, or return or throw after the catch statement.
    The only ways your method is allowed to complete is by returning a value or throwing an exception. As it stands, if an exception is thrown, you catch it, but then you don't throw anything and you don't return a value.
    So, like I said: What would you return from within or after catch? There's no good value to return. The only remotely reasonable choice would be null, but that sucks because now the caller has to explicitly check for it.
    So we conclude that catch shouldn't return anything. So catch must throw something. But what? You could wrap the SQLE in your own exception, but since the caller is dealing with JDBC constructs anyway (he has to handle the RS and close it and the Statement), there's no point in abstracting JDBC away. Plus he has to deal with SQLE anyway in his use of the RS and Statement. So you might as well just throw SQLE.
    So since you're going to just throw SQLE anyway, just get rid of the try/catch altogether and declare your method throws SQLException

Maybe you are looking for

  • HP Color Laserjet 5550dtn Printer problem

    The printer keeps printing out the same two color copies on 11x17 paper then follows with page after page of code that will not stop.  Any idea of how to stop this would be helpful...

  • Google Chrome issue in LionOS - Mission Control

    My Mac system version is Lion Mac OS X 10.7.2 (11C74) and Chrome is 16.0.912.63 9 (up to date). The problem is that every time I switch screens using Mission Control, Chrome comes together to the next space. It doesn't happen to Safari nor any other

  • WIN XP PRO vs WIN 7 PRO FOR CS5

    I'll be ordering a new "Sandy Bridge"  i72600 computer on Monday. Going from Win XP PRO 32 bit on my current PC, to a 64 bit OS on the new one. I was "set" to go with Win 7 PRO, but somewhat dreading the hassle of transforming to a "new" OS. I prefer

  • Major issues with iLife and iChat since upgrade to 8.2

    Since upgrading to iTunes 8.2, I have not been able to use iChat, iPhoto or iMovie regardless of whether or not iTunes is running. iChat boots and then crashes. At first, it only affected iChat itself but now its taking down my whole system. iPhoto h

  • Unable to run apps on MacBook Pro won't launch

    Hello, Mac OSX v 10.6.8 processor 2.7 i7 memory 4 gb MY MacBook Pro, 2010 has ground to a halt. I am unable to launch a web browser. I have tried to run disk utility with limited success,  I am not even sure that my hard disk is displaying in disk ut