473,414 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

unreported exception java.lang.Exception; must be caught or declared to be thrown

Hi,
I am new to java and cannot fiugre out what is wrong with my code. I keep getting the following error:
Upgrade.java:133: unreported exception java.lang.Exception; must be caught or declared to be thrown
new SpFwUpgrade(sp, UrlPath);
SpFwUpgrade is called in Upgrade.java as follows:
Expand|Select|Wrap|Line Numbers
  1.  try
  2.          {
  3.                   new SpFwUpgrade(sp, UrlPath);
  4.                    //new FTPGet(sp,fw,fw,fw);
  5.          }
  6.                 catch (STAFException e)
  7.          {
  8.                   return new STAFResult(e.rc, e.getMessage());
  9.          }
  10.  
  11.  
SpFwUpgrade.java is written as follows:
Expand|Select|Wrap|Line Numbers
  1. public class  SpFwUpgrade{
  2.              public SpFwUpgrade(String sp, String urlPath) throws Exception
  3.      {
  4.        try
  5.         {
  6.  
  7.           GetFw(urlPath);
  8.           SpFwUpgrade1(sp);
  9.  
  10.          }
  11.         catch(IOException e){System.err.println(e.getMessage());}
  12.      }
  13.  
  14.  
Any hints would be greatly appreciated!!!

Thanks
Anna
Apr 3 '10 #1
1 8194
Oh, just figured it out....was using different exceptions, dumb me!!!!
Apr 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Murat Tasan | last post by:
i am implementing a custom version of the java.util.Map interface. my custom version does some encryption stuff when making modifications to the map via one of the 4 modification methods (put,...
8
by: StepH | last post by:
Hi, I've this module : from optparse import OptionParser import re _version = "P1" def writeVar(f, line):
9
by: Claudio Di Flumeri | last post by:
Hello all, I've added a global exception handler to my application in this way: Sub Main() AddHandler Application.ThreadException, AddressOf ThreadException AddHandler...
41
by: Stuart Golodetz | last post by:
Hi all, Just wondering whether there's any reason why exception specifications are enforced at runtime, rather than at compile-time like in Java? (This was prompted by reading an article on...
132
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid...
4
by: cnixuser | last post by:
Hello, I am posting reguarding some modifications I made to a text editor program that I wrote in my java class at my school today. The file I was modifying is a very simple java text editor with...
7
by: shana07 | last post by:
I have unreported exceptions as below: unreported exception java.lang.Exception; must be caught or declared to be thrown Euclid euc = new Euclid(); ...
3
by: arasub | last post by:
ep 20, 2007 11:25:57 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found...
10
by: Rahul | last post by:
Hi Everyone, I have the following exception class, class E1 { }; class E2 {
9
by: =?Utf-8?B?UmFq?= | last post by:
How do I know which methods will throw exception when I am using FCL or other third party .Net library? I am developer of mostly native Windows applications and now .Net. After working few...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.