Commit 80b787c6 authored by mmhatre's avatar mmhatre

added getMsg Method

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216483 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5a2b766d
package ibase.webitm.ejb.sys;
import java.sql.Connection;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.Date;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.utility.ITMException;
import org.w3c.dom.*;
......@@ -1357,4 +1360,40 @@ public class UtilMethods {
}
//.........Modified by Rohini T on [12/07/09] [End].........
/**
* Returns error message
*
* @param trace trace for error description
* @param Code Error code message
* @return conn connection for method
* @exception none
*/
//added by manish mhatre on 7-feb-2019
//start manish
public String getMsg(String trace,String Code,Connection conn) throws ITMException, Exception
{
String mainStr ="";
try
{
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String errString = "";
errString = itmDBAccessEJB.getErrorString("",Code,"","",conn);
String begPart = errString.substring(0,errString.indexOf("<message>")+9);
String begDesc = errString.substring(0,errString.indexOf("<description>")+13);
String endDesc = errString.substring(errString.indexOf("</description>"));
mainStr= begPart + trace + " </message><description>";
mainStr= mainStr+endDesc;
begPart = null;
itmDBAccessEJB = null;
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return mainStr;
}
//end manish
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment