001    package railo.runtime.exp;
002    
003    import railo.commons.lang.StringUtil;
004    import railo.runtime.op.Caster;
005    
006    public class RemoteException extends PageExceptionImpl {
007    
008            public RemoteException(Throwable t) {
009                    super(createMessage(t),"remote");
010                    
011            }
012            private static String createMessage(Throwable t) {
013                    StringBuffer message=new StringBuffer(t.getMessage());
014                    if(t instanceof IPageException) {
015                            IPageException pe=(IPageException) t;
016                            String detail=pe.getDetail();
017                            if(!StringUtil.isEmpty(detail))message.append("; ").append(detail);
018                            
019                    }
020                    message.append("; ");
021                    message.append(Caster.toClassName(t));
022                    
023                    
024                    
025                    return message.toString();
026            }
027    
028    }