@@ -83,10 +83,10 @@ internal class NumericBoundParser(
8383 with (metadata) {
8484 Compilation .check(bound.isNotEmpty(), file, field.span) {
8585 """
86- The `($optionName )` option could not parse the passed bound value.
87- Target field: `${field.qualifiedName} `.
88- Reason: the passed value is empty.
89- Please provide either a numeric value or refer to a value of another field via its name or a path, if the field is nested.
86+ The `($optionName )` option could not parse the passed bound value.
87+ Target field: `${field.qualifiedName} `.
88+ Reason: the value is empty.
89+ Please provide either a numeric literal or refer to a value of another field via its name or a path (for nested fields) .
9090 """ .trimIndent()
9191 }
9292 }
@@ -104,23 +104,23 @@ internal class NumericBoundParser(
104104 if (fieldType in listOf (TYPE_FLOAT , TYPE_DOUBLE )) {
105105 Compilation .check(FLOAT .matches(number), file, field.span) {
106106 """
107- The `($optionName )` option could not parse the passed bound value.
108- The passed value : `$number `.
109- Target field: `${field.qualifiedName} `.
110- Field type: `${field.type.name} `.
111- Reason: a floating-point number is expected for floating-point fields .
112- Examples: `12.3`, `-0.1`, `6.02E2`.
107+ The `($optionName )` option could not parse the passed bound value.
108+ Value : `$number `.
109+ Target field: `${field.qualifiedName} `.
110+ Field type: `${field.type.name} `.
111+ Reason: a floating-point number is required for this field type .
112+ Examples: `12.3`, `-0.1`, `6.02E2`.
113113 """ .trimIndent()
114114 }
115115 } else {
116116 Compilation .check(INTEGER .matches(number), file, field.span) {
117117 """
118- The `($optionName )` option could not parse the passed bound value.
119- The passed value : `$number `.
120- Target field: `${field.qualifiedName} `.
121- Field type: `${field.type.name} `.
122- Reason: an integer number is expected for integer fields .
123- Examples: `123`, `-567823`.
118+ The `($optionName )` option could not parse the passed bound value.
119+ Value : `$number `.
120+ Target field: `${field.qualifiedName} `.
121+ Field type: `${field.type.name} `.
122+ Reason: an integer number is required for this field type .
123+ Examples: `123`, `-567823`.
124124 """ .trimIndent()
125125 }
126126 }
@@ -137,11 +137,11 @@ internal class NumericBoundParser(
137137
138138 Compilation .check(parsed != null , file, field.span) {
139139 """
140- The `($optionName )` option could not parse the passed bound value.
141- The passed value : `$number `.
142- Target field: `${field.qualifiedName} `.
143- Field type: `${field.type.name} `.
144- Reason: the value is out of range for the field type.
140+ The `($optionName )` option could not parse the passed bound value.
141+ Value : `$number `.
142+ Target field: `${field.qualifiedName} `.
143+ Field type: `${field.type.name} `.
144+ Reason: the value is out of range for this field type.
145145 """ .trimIndent()
146146 }
147147
@@ -154,11 +154,11 @@ internal class NumericBoundParser(
154154 ): KNumericBound {
155155 Compilation .check(fieldPath != field.name.value, file, field.span) {
156156 """
157- The `($optionName )` option cannot use the specified field value as a bound.
158- The specified field : `$fieldPath `.
159- Target field: `${field.qualifiedName} `.
160- Reason: self-referencing is prohibited .
161- Please refer to a value of another field via its name or a path, if the field is nested.
157+ The `($optionName )` option cannot use the specified field as a bound.
158+ Field path : `$fieldPath `.
159+ Target field: `${field.qualifiedName} `.
160+ Reason: self-referencing is not allowed .
161+ Please refer to a value of another field via its name or a path (for nested fields) .
162162 """ .trimIndent()
163163 }
164164
@@ -172,24 +172,24 @@ internal class NumericBoundParser(
172172 } catch (e: IllegalStateException ) {
173173 Compilation .error(file, field.span) {
174174 """
175- The `($optionName )` option could not parse the specified field path.
176- The specified field path: `$fieldPath `.
177- Target field: `${field.qualifiedName} `.
178- Reason: the specified field does not exist, or one of the components of the field path represents a non-message field.
179- Please make sure the provided field path references an existing field.
175+ The `($optionName )` option could not resolve the specified field path.
176+ Field path: `$fieldPath `.
177+ Target field: `${field.qualifiedName} `.
178+ Reason: the specified field does not exist, or one of the components of the field path represents a non-message field.
179+ Please make sure the field path refers to a valid field.
180180 """ .trimIndent()
181181 }
182182 }
183183
184184 val boundFieldType = boundField.type.primitive
185185 Compilation .check(boundFieldType in numericPrimitives, file, field.span) {
186186 """
187- The `($optionName )` option cannot use the specified field as a bound value .
188- The specified field : `$fieldPath `.
189- Type of the specified field : `${boundFieldType.name} `.
190- Target field: `${field.qualifiedName} `.
191- Reason: the specified field is not of numeric type.
192- Please specify a field of singular numeric type.
187+ The `($optionName )` option cannot use the specified field as a bound.
188+ Field path : `$fieldPath `.
189+ Field type : `${boundFieldType.name} `.
190+ Target field: `${field.qualifiedName} `.
191+ Reason: the specified field is not of a numeric type.
192+ Please use a field with a singular numeric type.
193193 """ .trimIndent()
194194 }
195195
0 commit comments