Open lindexi opened 3 years ago
提供一下复现步骤
@Ahoo-Wang 最简复现 demo 代码: https://github.com/lindexi/lindexi_gd/tree/176caf10abb0f58a7c8a99bb524e62c20eb17762/LanurleechuHiguburne/KocinarwemNeyejawhere
运行就可以看到了,本质问题就是我的配置文件写错了(没写)出现的异常
但是假设我不知道是我配置文件写错了,只是看异常的内容,不好了解是这个问题
我这里是有异常提示的。。。
SmartSql.Test.Unit.SmartSqlBuilderTest.Build_By_Xml
SmartSql.Exceptions.SmartSqlException: can not find Property.Name:SmartSqlConnectionString.
SmartSql.Exceptions.SmartSqlException
can not find Property.Name:SmartSqlConnectionString.
at SmartSql.Configuration.Properties.<GetPropertyValue>b__6_0(Match match)
at System.Text.RegularExpressions.Regex.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat)
at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
at SmartSql.Configuration.Properties.GetPropertyValue(String propExp)
@Ahoo-Wang 对的,有异常,但是很难通过异常和堆栈了解到问题所在。换句话说就是异常的文案我期望能更改,让开发者更好的了解到是自己配置的问题
多谢大佬
你的意思是得提示得更加友好一些,让开发者更快得定位问题对吧。有啥好的建议没有。
Steps to reproduce
配置进入一个不存在的配置项作为连接字符串
如上面代码,没有任何配置添加了 SmartSqlConnectionString 的定义
Expected result
能在异常信息里面体现是配置项缺失,如找不到 xx 配置等
Actual result