ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/tools/trace/org/apache/axis/tracetool Tracer.java
Date Mon, 04 Oct 2004 15:28:50 GMT
whitlock    2004/10/04 08:28:50

  Modified:    c/tools/trace/org/apache/axis/tracetool Tracer.java
  Log:
  Add try/catch around trace entry/exit to guard against bad data being passed into trace
  
  Revision  Changes    Path
  1.3       +7 -3      ws-axis/c/tools/trace/org/apache/axis/tracetool/Tracer.java
  
  Index: Tracer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tools/trace/org/apache/axis/tracetool/Tracer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Tracer.java	27 Sep 2004 15:33:46 -0000	1.2
  +++ Tracer.java	4 Oct 2004 15:28:50 -0000	1.3
  @@ -85,7 +85,7 @@
   		String line =
   			"\n"
   				+ "    #ifdef ENABLE_AXISTRACE\n"
  -				+ "    if (g_pAT) {\n"
  +				+ "    if (g_pAT) try {\n"
   				+ "        char traceLine[256];\n"
   				+ "        sprintf(traceLine,\"> ";
   		if (null != signature.getClassName())
  @@ -113,7 +113,9 @@
   
   		line += ");\n";
   		line += "        AXISTRACE1(traceLine,INFO);" + SIGNATURE + "\n";
  -		line += "    }\n";
  +		line += "    } catch (...) {\n";
  +            line += "        AXISTRACE1(\"Unknown exception caught during trace entry\",INFO);\n";
  +            line += "    }\n";
   		line += "    #endif\n";
   		write(line);
   		flush();
  @@ -190,7 +192,7 @@
   			+ " traceRet = ("
   			+ value
   			+ ");\n";
  -		line += "            if (g_pAT) {\n";
  +		line += "            if (g_pAT) try {\n";
   		line += "                char traceLine[256];\n";
   		line += "                sprintf(traceLine,\"< "
   			+ methodName
  @@ -200,6 +202,8 @@
   			+ retValue
   			+ ");\n";
   		line += "                AXISTRACE1(traceLine,INFO);" + SIGNATURE + "\n";
  +		line += "            } catch (...) {\n";
  +            line += "                AXISTRACE1(\"Unknown exception caught during trace
exit\",INFO);\n";
   		line += "            }\n";
   		line += "            return traceRet;\n";
   		line += "        #else\n";
  
  
  

Mime
View raw message