Shop OBEX P1 Docs P2 Docs Learn Events
C++ Exception — Parallax Forums

C++ Exception

EnriqueEnrique Posts: 90
edited 2007-09-05 10:25 in General Discussion
When compiling the following program the IDE gives a C++ Exception
·
// test variable locality
·
import stamp.core.*;
·
public class Locality{
·
· static LocalVariables here = new LocalVariables(20);
·
· static void main(){
· }
}
·
class LocalVariables{
·
· void LocalVariables(int argument){
··· argument=argument;
· }
}

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-09-03 18:44
    Please attach the classes exactly as they are.

    regards peter
  • EnriqueEnrique Posts: 90
    edited 2007-09-03 18:51
    Peter,



    The source code you see is all there is to it.

    I just discovered that the program has a syntax error, the constructor has a void keyword that shouldn't be there. When I remove the void it compiles without problems.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-09-03 19:19
    I still like to have the class that generates the error as an attachement.
    That way I am sure I have the exact file to reproduce the error so
    I can fix the C++ exception.

    regards peter
  • EnriqueEnrique Posts: 90
    edited 2007-09-05 09:13
    Let me know if you need any aditional information
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-09-05 10:25
    Thanks for the file.

    The error source is the 'void' instead of 'public' for class LocalVariables.
    On my system, Jikes aborts and I must 3 times click 'don't send rapport'
    before the C++ exception appears. This exception appears both
    in release 2.0.3 IDE as in the beta IDE.

    I will see if I can prohibit the C++ exception, preferable with a message.
    There is nothing I can do about Jikes, so the abort windows will
    keep popping up for such syntax errors. So perhaps it is best to simply
    prohibit the C++ exception window to popup as well. There really is no
    point in having a message stating Jikes aborted, as that is already clear.

    regards peter
Sign In or Register to comment.