Skip to content

找不到配置项的异常提示有点迷 #147

Description

@lindexi

Steps to reproduce

配置进入一个不存在的配置项作为连接字符串

<Database>
    <DbProvider Name="SQLite"/>
    <Write Name="WriteDB" ConnectionString="${SmartSqlConnectionString}"/>
    <Read Name="ReadDb-1" ConnectionString="${SmartSqlConnectionString}" Weight="100"/>
    <Read Name="ReadDb-2" ConnectionString="${SmartSqlConnectionString}" Weight="100"/>
</Database>

如上面代码,没有任何配置添加了 SmartSqlConnectionString 的定义

Expected result

能在异常信息里面体现是配置项缺失,如找不到 xx 配置等

Actual result

    SmartSql.Configuration.Properties.GetPropertyValue.AnonymousMethod__6_0(System.Text.RegularExpressions.Match)
    System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.MatchEvaluator, System.Text.RegularExpressions.Regex, string, int, int)
    System.Text.RegularExpressions.Regex.Replace(string, System.Text.RegularExpressions.MatchEvaluator)

图片

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions