function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
The Ajay GuptaThe Ajay Gupta 

Trying to run below code in Developer Console & getting error

Trying to run below code in Developer Console & getting error:
public class Test{
    String abc;
    Integer i;    
       Double d;
        public Test(){
            abc= null;
            i=0;
            d=0.0;
        }
    public Test(String abc,Integer i, Double d){
            this.abc=abc;
            this.i=i;
            this.d=d;
        }
}
Test t = new Test('Test',45,450);
System.debug(t);

Error :UNKNOWN ERROR: apex.bytecodeinterpreter.InterpreterRuntimeException: Unable to load class: esw/anon$Test Error Id: 923405943-75655 (-539347543)

What does it mean?
Arunkumar RArunkumar R
Ajay,

Try to change the Class name from Test to Someother names. Don't use salesforce keywords, this might lead such unknow excption.

If this solution helpful, mark this a solution.

Thanks.
The Ajay GuptaThe Ajay Gupta
I have also tried after renaming the class but still smae issue . Please find the below calss in developer console

public class YoYo{
    String abc;
    Integer i;    
       Double d;
        public YoYo(){

        }
    public YoYo(String abc,Integer i, Double d){
            this.abc=abc;
            this.i=i;
            this.d=d;
        }
}

YoYo t = new YoYo();


 
Arunkumar RArunkumar R
Hi Ajay,

I have tried your class in my org, i am not getting any errors. Could you once again verify the below steps,

1. Create a new class and paste the below code and save it,
 
public class SampleCtrl{
    String abc;
    Integer i;    
       Double d;
        public SampleCtrl(){

        }
    public SampleCtrl(String abc,Integer i, Double d){
            this.abc=abc;
            this.i=i;
            this.d=d;
        }
}

2. Open Developer Console and click Execute anonymous window (Ctrl+E) and paste the below code and excute,

SampleCtrl t = new SampleCtrl('Test',45,450);
System.debug(t);
 
xnxn
It seems to be a bug that occurs in packaging orgs once a namespace has been set.  Note that the error says that it's trying to load the class from the esw namespace.