hi,
i'm reading data from serialport using javax.comm API but when i run the code 2-3 times it is showing port currently own by this,but i have closed the port what's the problem i'm not getting plz help me
this is expetion:
javax.comm.PortInUseException: Port currently owned by flashhandler.TwoWaySerialComm
Thanks for reply
...
I am creating a j2me application, and when I try to debug it in netbeans, I get an error when I reach a point in my code.
The code is as follows
class MyClass{
public MyClass()
{
OtherClass oc = new OtherClass();
oc.MyMethod();
}
}
The other method is as follows:
public void MyMethod()
{
boolean isVal...
I truly love NUnit's new(er) ability to test for expected exception testing, ie:
var ex = Assert.Throws<SomeException>(()=>methodToThrowException("blah"));
One minor issue I find is that to test some sort of operator overload or other assignment type functionality, the only way I can know how to do this is by giving the compiler a va...
This is a realtime MMO client, at some random point it will crash with a jump to 0, and the stack frame is unreadable. The crashreporter (and gdb) will report thead 0 crashed
XC_BAD_ACCESS (SIGBUS)
KERN_PROTECTION_FAILURE at 0x0000000000000000
and srr0=lr=exception address=0
How can I catch where this error occurs?
...
Hello there,
I'm having problem when running my Windows Forms program.
In the program, I have a button that calls OpenFileDialog's ShowDialog() everytime it clicked.
public partial class MyProgram : Form
{
private Button myButton;
private OpenFileDialog openFD;
private string filePath;
public MyProgram()
{
InitializeComp...
We use the IHTMLElementCollection in an ASP.NET 2.0 application.
Sometimes- not always - it gives us a UnauthorizedAccessException. I think it only happens on our server, and not locally.
I tried searching in searchdotnet.com, and found only 2 results, but in both of them the use of IHTMLElementCollection was the solution to that except...
Is there (not NotImplementedException, not supported).
...
Hi,
Update: This is, as I was told, no principle Python related problem, but seems to be more specific. See below for more explanations to my problem.
I have a custom exception (let's call it CustomException), that lives in a file named exceptions.py. Now imagine, that I can import this file via two paths:
import application.exception...
I'm getting an error when trying to create a barcode image using a barcode font. This is happening in production but not in dev.
The method creating the barcode is:
/// <summary>
/// Create a barcode image by writing out a string using a barcode font and save it
/// </summary>
/// <param name="barcodeText">The text string of the barco...
Custom non-fatal exception derive from which class in asp.net 3.5 ?
...
Hi,
This seems to be a trivial question but I got hung on it for a few hours now (maybe too much Java killed my C++ braincells).
I have created a class that has the following constructor (i.e. no default constructor)
VACaptureSource::VACaptureSource( std::string inputType, std::string inputLocation ) {
if( type == "" || location =...
How can I get output from Java anonymous classes? In .Net I would use closures.
executor = Executors.newSingleThreadExecutor();
final Runnable runnable = new Runnable() {
public Exception exception;
@Override
public void run() {
try {
doSomething();
}
catch (Exception exception) {
// I'd like to report thi...
When I instantiate a textField, I have a number in it that I want to be the default text. The problem is, I can't seem to be able to place that value into the textfield without getting an error. The strange thing about it is that the same TextField is what I use to set the value of the variable containing the number.
TextField myTF = ...
Referring to What is the correct way to make a custom .NET Exception serializable?
and Are all .NET Exceptions serializable? ...
Why should my exceptions be serializable?
Someone said "it can be considered a bug" if a custom exception defined by a third party library, is not serializable. Why?
Why are exceptions different than oth...
The answer to What is the correct way to make exceptions serializable? says that the "correct" base implementation for a custom exception includes 4 ctors:
[Serializable]
public class SerializableExceptionWithoutCustomProperties : Exception
{
public SerializableExceptionWithoutCustomProperties()
{
}
public Serializabl...
We have VS.Net solution with 20 projects in it.
Occasionaly, in VS.NET, when we try to build/debug our solution, we get following error:
Unknown build error, 'Exception of type 'System.OutOfMemoryException' was thrown
Only way to "fix" this issue is to reopen Visual Studio and then solution build goes well, but again after some time O...
How can I create a new Exception different from the pre-made types?
public class **InvalidBankFeeAmountException** extends Exception{
public InvalidBankFeeAmountException(String message){
super(message);
}
}
It will show the warning for the InvalidBankFeeAmountException which is written in the first comment.
...
My Perl application uses resources that become temporarily unavailable at times, causing exceptions using die. Most notably, it accesses SQLite databases that are shared by multiple threads and with other applications using through DBIx::Class. Whenever such an exception occurs, the operation should be retried until a timeout has been re...
I have a method which takes a directory path as a string. In the beginning of the method it checks if this path exists and if not it should throw an exception. I'm thinking it should maybe throw a DirectoryNotFoundException or something instead of a less specific ArgumentException.
I read the msdn documentation of that DirectoryNotFound...
Hi
I am wondering why should you unit test exceptions? Like I thought you should not be testing code you did not write.
In a sense to me you're not really writing the exception. Sure you put it in a try/catch but should you not assume that the try catch will work and you will catch that exception.
Like for instance I have some GetUser...