@@ -382,7 +382,7 @@ function languageExists($lang)
382
382
} else {
383
383
throw new Text_LanguageDetect_Exception (
384
384
'Unknown type passed to languageExists() ' ,
385
- Text_LanguageDetect_Exception::UNKNOWN_TYPE
385
+ Text_LanguageDetect_Exception::PARAM_TYPE
386
386
);
387
387
}
388
388
}
@@ -725,7 +725,7 @@ function detect($sample, $limit = 0)
725
725
} else {
726
726
throw new Text_LanguageDetect_Exception (
727
727
'Error during block detection ' ,
728
- Text_LanguageDetect_Exception::ERR_BLOCK_DETECTION
728
+ Text_LanguageDetect_Exception::BLOCK_DETECTION
729
729
);
730
730
}
731
731
@@ -910,14 +910,14 @@ function detectUnicodeBlocks($str, $skip_symbols)
910
910
if (!is_bool ($ skip_symbols )) {
911
911
throw new Text_LanguageDetect_Exception (
912
912
'Second parameter must be boolean ' ,
913
- Text_LanguageDetect_Exception::ERR_PARAM_TYPE
913
+ Text_LanguageDetect_Exception::PARAM_TYPE
914
914
);
915
915
}
916
916
917
917
if (!is_string ($ str )) {
918
918
throw new Text_LanguageDetect_Exception (
919
919
'First parameter was not a string ' ,
920
- Text_LanguageDetect_Exception::ERR_PARAM_TYPE
920
+ Text_LanguageDetect_Exception::PARAM_TYPE
921
921
);
922
922
}
923
923
@@ -953,7 +953,7 @@ function unicodeBlockName($unicode) {
953
953
if ($ this ->utf8strlen ($ unicode ) > 1 ) {
954
954
throw new Text_LanguageDetect_Exception (
955
955
'Pass this function only a single char ' ,
956
- Text_LanguageDetect_Exception::ERR_PARAM_TYPE
956
+ Text_LanguageDetect_Exception::PARAM_TYPE
957
957
);
958
958
}
959
959
@@ -962,15 +962,15 @@ function unicodeBlockName($unicode) {
962
962
if ($ unicode == -1 ) {
963
963
throw new Text_LanguageDetect_Exception (
964
964
'Malformatted char ' ,
965
- Text_LanguageDetect_Exception::ERR_INVALID_CHAR
965
+ Text_LanguageDetect_Exception::INVALID_CHAR
966
966
);
967
967
}
968
968
969
969
// input check
970
970
} elseif (!is_int ($ unicode )) {
971
971
throw new Text_LanguageDetect_Exception (
972
972
'Input must be of type string or int. ' ,
973
- Text_LanguageDetect_Exception::ERR_PARAM_TYPE
973
+ Text_LanguageDetect_Exception::PARAM_TYPE
974
974
);
975
975
}
976
976
0 commit comments