Re: Exception 2 - string...HELP
"toy" <tasheeta@xxxxxxxxx> wrote in message
news:1131395434.658999.304650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Miller_Rabin.java:24: unreported exception java.io.IOException; must be
> > caught or declared to be thrown
> > String ns = stdin.readLine();
>
It may throw a 'checked' exception so you must provide a way to deal with
that possibility.
String ns = null;
try {
ns = stdin.readLine();
}
catch(java.io.IOException ex) {
ex.printStackTrace();
}
note ns is declared outside of the try/catch block so that the reference
remains in scope so you can use it later.
--
Mike W
.
Relevant Pages
- SoapServerException
... I'm trying to consume the GetAttachments of the Site Web Service, ... getting an Microsoft.SharePoint.SoapServer.SoapServerException thrown. ... foreach (string str in strAttach) ... Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was ... (microsoft.public.sharepoint.portalserver.development) - Re: Is there a difference between passing "" and passing Nothing to a Windows API ?
... Many methods in the .NET Framework throw 'NullReferenceExceptions' if 'Nothing' is passed to them in a 'String' parameter because 'Nothing' doesn't make sense to this method. ... otherwise an appropriate exception is thrown. ... 'NullReferenceException' is thrown if 'Nothing' is passed to the method. ... (microsoft.public.dotnet.languages.vb) - Re: MapViewOfFile -> The specified procedure could not be found.
... I don't get thrown an exception, but the program mIRC ... why do you check if the return value converted to a string is ... (microsoft.public.dotnet.languages.vb) - External component has thrown an exception - sending email with asp.net
... An unhandled exception occurred during the execution of the current web request. ... Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception. ... System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText) +74 ... (microsoft.public.dotnet.framework.aspnet) - Re: output streams and long strings
... > when large files are encoded, the write method in the output stream is ... > called and no exception is thrown, but the string is never written ... (comp.lang.java.help) |
|