1+ /*----------------------------------------------------------
2+ This Source Code Form is subject to the terms of the
3+ Mozilla Public License, v.2.0. If a copy of the MPL
4+ was not distributed with this file, You can obtain one
5+ at http://mozilla.org/MPL/2.0/.
6+ ----------------------------------------------------------*/
7+
8+ using System ;
9+ using OneScript . Localization ;
10+
11+ namespace OneScript . Exceptions
12+ {
13+ public class ComparisonException : RuntimeException
14+ {
15+ public ComparisonException ( BilingualString message ) : base ( message )
16+ {
17+ }
18+
19+ public static ComparisonException NotSupported ( )
20+ {
21+ return new ComparisonException ( new BilingualString (
22+ $ "Сравнение на больше/меньше для типа не поддерживается",
23+ $ "Greater-than/Less-than comparison operations are not supported") ) ;
24+ }
25+
26+ public static ComparisonException NotSupported ( string type )
27+ {
28+ return new ComparisonException ( new BilingualString (
29+ $ "Сравнение на больше/меньше для типа '{ type } ' не поддерживается",
30+ $ "Greater-than/Less-than comparison operations are not supported for '{ type } '") ) ;
31+ }
32+
33+ public static ComparisonException NotSupported ( string type1 , string type2 )
34+ {
35+ return new ComparisonException ( new BilingualString (
36+ $ "Сравнение на больше/меньше типов '{ type1 } ' и '{ type2 } ' не поддерживается ",
37+ $ "Greater-than/Less-than comparison operations are not supported for '{ type1 } ' and '{ type2 } '") ) ;
38+ }
39+ }
40+ }
0 commit comments