Eclipse Conditional-Breakpoint. How to check if exception occurs?

后端 未结 3 1092
庸人自扰
庸人自扰 2021-01-14 00:20

I have this function:

public static FradId readFradId(DataInput pIn) throws IOException {
    Integer lMainId = Integer.valueOf(pIn.readInt());
    Integer l         


        
3条回答
  •  时光说笑
    2021-01-14 01:01

    did you try something similar?

    public static FradId readFradId(DataInput pIn) throws IOException {
        Integer lMainId = Integer.valueOf(pIn.readInt());
        Integer lReferenceId = Integer.valueOf(pIn.readInt());
        try{
            String lShortname = pIn.readUTF();
        }catch(Exception e){
           //need a breakpoint here.
        }
        return new FradId(lMainId,lReferenceId,lShortname);
    }
    

提交回复
热议问题