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
- try
- {
- new SpFwUpgrade(sp, UrlPath);
- //new FTPGet(sp,fw,fw,fw);
- }
- catch (STAFException e)
- {
- return new STAFResult(e.rc, e.getMessage());
- }
Expand|Select|Wrap|Line Numbers
- public class SpFwUpgrade{
- public SpFwUpgrade(String sp, String urlPath) throws Exception
- {
- try
- {
- GetFw(urlPath);
- SpFwUpgrade1(sp);
- }
- catch(IOException e){System.err.println(e.getMessage());}
- }
Thanks
Anna