Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb
In directory sc8-pr-cvs1:/tmp/cvs-serv10367/src/org/asturlinux/frade/prolix/ejb/sessionjb
Modified Files:
ProlixMainBean.java
Log Message:
Added exceptions in Bean - Corrected console client - updated jsp
Index: ProlixMainBean.java
===================================================================
RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ProlixMainBean.java 9 Jul 2003 12:59:54 -0000 1.16
--- ProlixMainBean.java 14 Jul 2003 21:49:39 -0000 1.17
***************
*** 101,122 ****
* @ejb:interface-method
**/
! public String getProgram()
{
! /**
! * Some format operations to obtain a pretty output
! * FIXME Delete last "."
! * FIXME What happend if "loadProgram" is not previously called?
! */
! StringBuffer result = new StringBuffer(_program);
! // Dirty trick
! result.append(".");
! int position = result.toString().indexOf(".");
! while (position != -1)
! {
! System.out.println("in the loop");
! result.insert(position+1,"\n");
! position = result.toString().indexOf(".",position+2);
! }
! return result.toString();
}
--- 101,110 ----
* @ejb:interface-method
**/
! public String getProgram() throws ProgramNotLoadedException
{
! if (_program == null)
! throw new ProgramNotLoadedException();
!
! return _program;
}
***************
*** 138,143 ****
* @ejb:interface-method
**/
! public String getCurrentConsult()
{
return _consult;
}
--- 126,134 ----
* @ejb:interface-method
**/
! public String getCurrentConsult()
! throws QueryNotLoadedException
{
+ if (_consult == null)
+ throw new QueryNotLoadedException();
return _consult;
}
|