You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/03/01 19:46:16 UTC
svn commit: r155812 -
incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
Author: gbayon
Date: Tue Mar 1 10:46:15 2005
New Revision: 155812
URL: http://svn.apache.org/viewcvs?view=rev&rev=155812
Log:
- fixed IBATISNET-26
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs?view=diff&r1=155811&r2=155812
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs Tue Mar 1 10:46:15 2005
@@ -108,10 +108,10 @@
}
/// <summary>
- ///
+ /// Load an XML resource from a location specify by the node.
/// </summary>
- /// <param name="node"></param>
- /// <returns></returns>
+ /// <param name="node">An location node</param>
+ /// <returns>Return the Xml document load.</returns>
public static XmlDocument GetAsXmlDocument(XmlNode node)
{
XmlDocument xmlDocument = null;
@@ -133,9 +133,9 @@
}
/// <summary>
- ///
+ /// Get the path resource of an url or resource location.
/// </summary>
- /// <param name="node"></param>
+ /// <param name="node">The specification from where to load.</param>
/// <returns></returns>
public static string GetValueOfNodeResourceUrl(XmlNode node)
{
@@ -313,10 +313,10 @@
/// <summary>
- ///
+ /// Load a file from a given path
/// </summary>
- /// <param name="path"></param>
- /// <returns></returns>
+ /// <param name="path">The path</param>
+ /// <returns>return a FileInfo</returns>
public static FileInfo GetFileInfo(string path)
{
string file = string.Empty;
@@ -329,8 +329,18 @@
{
file = path;
}
-
- return new FileInfo(file);
+ FileInfo fileInfo = null;
+ try
+ {
+ fileInfo = new FileInfo(file);
+ }
+ catch
+ {
+ _logger.Error("Could not load file from path : " + path);
+ throw new ConfigurationException(
+ string.Format("Unable to load file \"{0}\" from path.", path));
+ }
+ return fileInfo;
}
@@ -386,7 +396,6 @@
#endregion
-
#region Inner Class : FileAssemblyInfo
/// <summary>
/// Holds data about a <see cref="System.Type"/> and it's
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config?view=diff&r1=155811&r2=155812
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/bin/Debug/IBatisNet.DataMapper.Test.dll.config Tue Mar 1 10:46:15 2005
@@ -17,7 +17,7 @@
<!-- To test MySql via ByteFx value="ByteFx" -->
<!-- To test via OleDb provider (any database) value="OleDb" -->
<!-- To test via Odbc provider (any database) value="Odbc" -->
- <add key="providerType" value="OleDb"/>
+ <add key="providerType" value="SqlClient"/>
</appSettings>
<!-- This section contains the log4net configuration settings -->