| 1 | package DBIx::ParseException::Pg; | ||
| 2 | BEGIN { | ||
| 3 | $DBIx::ParseException::Pg::VERSION = '0.001000_03'; | ||
| 4 | } | ||
| 5 | |||
| 6 | use Moo; | ||
| 7 | use DBIx::Exceptions; | ||
| 8 | |||
| 9 | my %error_codes = ( | ||
| 10 | '00000' => { | ||
| 11 | id => 'successful_completion', | ||
| 12 | }, | ||
| 13 | '01000' => { | ||
| 14 | id => 'warning', | ||
| 15 | }, | ||
| 16 | '0100C' => { | ||
| 17 | id => 'dynamic_result_sets_returned', | ||
| 18 | }, | ||
| 19 | '01008' => { | ||
| 20 | id => 'implicit_zero_bit_padding', | ||
| 21 | }, | ||
| 22 | '01003' => { | ||
| 23 | id => 'null_value_eliminated_in_set_function', | ||
| 24 | }, | ||
| 25 | '01007' => { | ||
| 26 | id => 'privilege_not_granted', | ||
| 27 | }, | ||
| 28 | '01006' => { | ||
| 29 | id => 'privilege_not_revoked', | ||
| 30 | }, | ||
| 31 | '01004' => { | ||
| 32 | id => 'string_data_right_truncation', | ||
| 33 | }, | ||
| 34 | '01P01' => { | ||
| 35 | id => 'deprecated_feature', | ||
| 36 | }, | ||
| 37 | '02000' => { | ||
| 38 | id => 'no_data', | ||
| 39 | }, | ||
| 40 | '02001' => { | ||
| 41 | id => 'no_additional_dynamic_result_sets_returned', | ||
| 42 | }, | ||
| 43 | '03000' => { | ||
| 44 | id => 'sql_statement_not_yet_complete', | ||
| 45 | }, | ||
| 46 | '08000' => { | ||
| 47 | id => 'connection_exception', | ||
| 48 | }, | ||
| 49 | '08003' => { | ||
| 50 | id => 'connection_does_not_exist', | ||
| 51 | }, | ||
| 52 | '08006' => { | ||
| 53 | id => 'connection_failure', | ||
| 54 | }, | ||
| 55 | '08001' => { | ||
| 56 | id => 'sqlclient_unable_to_establish_sqlconnection', | ||
| 57 | }, | ||
| 58 | '08004' => { | ||
| 59 | id => 'sqlserver_rejected_establishment_of_sqlconnection', | ||
| 60 | }, | ||
| 61 | '08007' => { | ||
| 62 | id => 'transaction_resolution_unknown', | ||
| 63 | }, | ||
| 64 | '08P01' => { | ||
| 65 | id => 'protocol_violation', | ||
| 66 | }, | ||
| 67 | '09000' => { | ||
| 68 | id => 'triggered_action_exception', | ||
| 69 | }, | ||
| 70 | '0A000' => { | ||
| 71 | id => 'feature_not_supported', | ||
| 72 | }, | ||
| 73 | '0B000' => { | ||
| 74 | id => 'invalid_transaction_initiation', | ||
| 75 | }, | ||
| 76 | '0F000' => { | ||
| 77 | id => 'locator_exception', | ||
| 78 | }, | ||
| 79 | '0F001' => { | ||
| 80 | id => 'invalid_locator_specification', | ||
| 81 | }, | ||
| 82 | '0L000' => { | ||
| 83 | id => 'invalid_grantor', | ||
| 84 | }, | ||
| 85 | '0LP01' => { | ||
| 86 | id => 'invalid_grant_operation', | ||
| 87 | }, | ||
| 88 | '0P000' => { | ||
| 89 | id => 'invalid_role_specification', | ||
| 90 | }, | ||
| 91 | '21000' => { | ||
| 92 | id => 'cardinality_violation', | ||
| 93 | }, | ||
| 94 | '22000' => { | ||
| 95 | id => 'data_exception', | ||
| 96 | }, | ||
| 97 | '2202E' => { | ||
| 98 | id => 'array_subscript_error', | ||
| 99 | }, | ||
| 100 | '22021' => { | ||
| 101 | id => 'character_not_in_repertoire', | ||
| 102 | }, | ||
| 103 | '22008' => { | ||
| 104 | id => 'datetime_field_overflow', | ||
| 105 | }, | ||
| 106 | '22012' => { | ||
| 107 | id => 'division_by_zero', | ||
| 108 | }, | ||
| 109 | '22005' => { | ||
| 110 | id => 'error_in_assignment', | ||
| 111 | }, | ||
| 112 | '2200B' => { | ||
| 113 | id => 'escape_character_conflict', | ||
| 114 | }, | ||
| 115 | '22022' => { | ||
| 116 | id => 'indicator_overflow', | ||
| 117 | }, | ||
| 118 | '22015' => { | ||
| 119 | id => 'interval_field_overflow', | ||
| 120 | }, | ||
| 121 | '2201E' => { | ||
| 122 | id => 'invalid_argument_for_logarithm', | ||
| 123 | }, | ||
| 124 | '2201F' => { | ||
| 125 | id => 'invalid_argument_for_power_function', | ||
| 126 | }, | ||
| 127 | '2201G' => { | ||
| 128 | id => 'invalid_argument_for_width_bucket_function', | ||
| 129 | }, | ||
| 130 | '22018' => { | ||
| 131 | id => 'invalid_character_value_for_cast', | ||
| 132 | }, | ||
| 133 | '22007' => { | ||
| 134 | id => 'invalid_datetime_format', | ||
| 135 | }, | ||
| 136 | '22019' => { | ||
| 137 | id => 'invalid_escape_character', | ||
| 138 | }, | ||
| 139 | '2200D' => { | ||
| 140 | id => 'invalid_escape_octet', | ||
| 141 | }, | ||
| 142 | '22025' => { | ||
| 143 | id => 'invalid_escape_sequence', | ||
| 144 | }, | ||
| 145 | '22P06' => { | ||
| 146 | id => 'nonstandard_use_of_escape_character', | ||
| 147 | }, | ||
| 148 | '22010' => { | ||
| 149 | id => 'invalid_indicator_parameter_value', | ||
| 150 | }, | ||
| 151 | '22020' => { | ||
| 152 | id => 'invalid_limit_value', | ||
| 153 | }, | ||
| 154 | '22023' => { | ||
| 155 | id => 'invalid_parameter_value', | ||
| 156 | }, | ||
| 157 | '2201B' => { | ||
| 158 | id => 'invalid_regular_expression', | ||
| 159 | }, | ||
| 160 | '22009' => { | ||
| 161 | id => 'invalid_time_zone_displacement_value', | ||
| 162 | }, | ||
| 163 | '2200C' => { | ||
| 164 | id => 'invalid_use_of_escape_character', | ||
| 165 | }, | ||
| 166 | '2200G' => { | ||
| 167 | id => 'most_specific_type_mismatch', | ||
| 168 | }, | ||
| 169 | '22004' => { | ||
| 170 | id => 'null_value_not_allowed', | ||
| 171 | }, | ||
| 172 | '22002' => { | ||
| 173 | id => 'null_value_no_indicator_parameter', | ||
| 174 | }, | ||
| 175 | '22003' => { | ||
| 176 | id => 'numeric_value_out_of_range', | ||
| 177 | }, | ||
| 178 | '22026' => { | ||
| 179 | id => 'string_data_length_mismatch', | ||
| 180 | }, | ||
| 181 | '22001' => { | ||
| 182 | id => 'string_data_right_truncation', | ||
| 183 | }, | ||
| 184 | '22011' => { | ||
| 185 | id => 'substring_error', | ||
| 186 | }, | ||
| 187 | '22027' => { | ||
| 188 | id => 'trim_error', | ||
| 189 | }, | ||
| 190 | '22024' => { | ||
| 191 | id => 'unterminated_c_string', | ||
| 192 | }, | ||
| 193 | '2200F' => { | ||
| 194 | id => 'zero_length_character_string', | ||
| 195 | }, | ||
| 196 | '22P01' => { | ||
| 197 | id => 'floating_point_exception', | ||
| 198 | }, | ||
| 199 | '22P02' => { | ||
| 200 | id => 'invalid_text_representation', | ||
| 201 | }, | ||
| 202 | '22P03' => { | ||
| 203 | id => 'invalid_binary_representation', | ||
| 204 | }, | ||
| 205 | '22P04' => { | ||
| 206 | id => 'bad_copy_file_format', | ||
| 207 | }, | ||
| 208 | '22P05' => { | ||
| 209 | id => 'untranslatable_character', | ||
| 210 | }, | ||
| 211 | |||
| 212 | # constraints | ||
| 213 | '23000' => { | ||
| 214 | id => 'integrity_constraint_violation', | ||
| 215 | group => 'constraint', | ||
| 216 | }, | ||
| 217 | '23001' => { | ||
| 218 | id => 'restrict_violation', | ||
| 219 | group => 'constraint', | ||
| 220 | }, | ||
| 221 | '23502' => { | ||
| 222 | id => 'not_null_violation', | ||
| 223 | group => 'constraint', | ||
| 224 | class => 'NotNull', | ||
| 225 | }, | ||
| 226 | '23503' => { | ||
| 227 | id => 'foreign_key_violation', | ||
| 228 | group => 'constraint', | ||
| 229 | class => 'ForeignKey', | ||
| 230 | }, | ||
| 231 | '23505' => { | ||
| 232 | id => 'unique_violation', | ||
| 233 | group => 'constraint', | ||
| 234 | class => 'NotUnique', | ||
| 235 | }, | ||
| 236 | |||
| 237 | |||
| 238 | '23514' => { | ||
| 239 | id => 'check_violation', | ||
| 240 | }, | ||
| 241 | '24000' => { | ||
| 242 | id => 'invalid_cursor_state', | ||
| 243 | }, | ||
| 244 | '25000' => { | ||
| 245 | id => 'invalid_transaction_state', | ||
| 246 | }, | ||
| 247 | '25001' => { | ||
| 248 | id => 'active_sql_transaction', | ||
| 249 | }, | ||
| 250 | '25002' => { | ||
| 251 | id => 'branch_transaction_already_active', | ||
| 252 | }, | ||
| 253 | '25008' => { | ||
| 254 | id => 'held_cursor_requires_same_isolation_level', | ||
| 255 | }, | ||
| 256 | '25003' => { | ||
| 257 | id => 'inappropriate_access_mode_for_branch_transaction', | ||
| 258 | }, | ||
| 259 | '25004' => { | ||
| 260 | id => 'inappropriate_isolation_level_for_branch_transaction', | ||
| 261 | }, | ||
| 262 | '25005' => { | ||
| 263 | id => 'no_active_sql_transaction_for_branch_transaction', | ||
| 264 | }, | ||
| 265 | '25006' => { | ||
| 266 | id => 'read_only_sql_transaction', | ||
| 267 | }, | ||
| 268 | '25007' => { | ||
| 269 | id => 'schema_and_data_statement_mixing_not_supported', | ||
| 270 | }, | ||
| 271 | '25P01' => { | ||
| 272 | id => 'no_active_sql_transaction', | ||
| 273 | }, | ||
| 274 | '25P02' => { | ||
| 275 | id => 'in_failed_sql_transaction', | ||
| 276 | }, | ||
| 277 | '26000' => { | ||
| 278 | id => 'invalid_sql_statement_name', | ||
| 279 | }, | ||
| 280 | '27000' => { | ||
| 281 | id => 'triggered_data_change_violation', | ||
| 282 | }, | ||
| 283 | '28000' => { | ||
| 284 | id => 'invalid_authorization_specification', | ||
| 285 | }, | ||
| 286 | '2B000' => { | ||
| 287 | id => 'dependent_privilege_descriptors_still_exist', | ||
| 288 | }, | ||
| 289 | '2BP01' => { | ||
| 290 | id => 'dependent_objects_still_exist', | ||
| 291 | }, | ||
| 292 | '2D000' => { | ||
| 293 | id => 'invalid_transaction_termination', | ||
| 294 | }, | ||
| 295 | '2F000' => { | ||
| 296 | id => 'sql_routine_exception', | ||
| 297 | }, | ||
| 298 | '2F005' => { | ||
| 299 | id => 'function_executed_no_return_statement', | ||
| 300 | }, | ||
| 301 | '2F002' => { | ||
| 302 | id => 'modifying_sql_data_not_permitted', | ||
| 303 | }, | ||
| 304 | '2F003' => { | ||
| 305 | id => 'prohibited_sql_statement_attempted', | ||
| 306 | }, | ||
| 307 | '2F004' => { | ||
| 308 | id => 'reading_sql_data_not_permitted', | ||
| 309 | }, | ||
| 310 | '34000' => { | ||
| 311 | id => 'invalid_cursor_name', | ||
| 312 | }, | ||
| 313 | '38000' => { | ||
| 314 | id => 'external_routine_exception', | ||
| 315 | }, | ||
| 316 | '38001' => { | ||
| 317 | id => 'containing_sql_not_permitted', | ||
| 318 | }, | ||
| 319 | '38002' => { | ||
| 320 | id => 'modifying_sql_data_not_permitted', | ||
| 321 | }, | ||
| 322 | '38003' => { | ||
| 323 | id => 'prohibited_sql_statement_attempted', | ||
| 324 | }, | ||
| 325 | '38004' => { | ||
| 326 | id => 'reading_sql_data_not_permitted', | ||
| 327 | }, | ||
| 328 | '39000' => { | ||
| 329 | id => 'external_routine_invocation_exception', | ||
| 330 | }, | ||
| 331 | '39001' => { | ||
| 332 | id => 'invalid_sqlstate_returned', | ||
| 333 | }, | ||
| 334 | '39004' => { | ||
| 335 | id => 'null_value_not_allowed', | ||
| 336 | }, | ||
| 337 | '39P01' => { | ||
| 338 | id => 'trigger_protocol_violated', | ||
| 339 | }, | ||
| 340 | '39P02' => { | ||
| 341 | id => 'srf_protocol_violated', | ||
| 342 | }, | ||
| 343 | '3B000' => { | ||
| 344 | id => 'savepoint_exception', | ||
| 345 | }, | ||
| 346 | '3B001' => { | ||
| 347 | id => 'invalid_savepoint_specification', | ||
| 348 | }, | ||
| 349 | '3D000' => { | ||
| 350 | id => 'invalid_catalog_name', | ||
| 351 | }, | ||
| 352 | '3F000' => { | ||
| 353 | id => 'invalid_schema_name', | ||
| 354 | }, | ||
| 355 | '40000' => { | ||
| 356 | id => 'transaction_rollback', | ||
| 357 | }, | ||
| 358 | '40002' => { | ||
| 359 | id => 'transaction_integrity_constraint_violation', | ||
| 360 | }, | ||
| 361 | '40001' => { | ||
| 362 | id => 'serialization_failure', | ||
| 363 | }, | ||
| 364 | '40003' => { | ||
| 365 | id => 'statement_completion_unknown', | ||
| 366 | }, | ||
| 367 | '40P01' => { | ||
| 368 | id => 'deadlock_detected', | ||
| 369 | class => 'Deadlock', | ||
| 370 | group => 'deadlock' | ||
| 371 | }, | ||
| 372 | |||
| 373 | # syntax errors | ||
| 374 | '42000' => { | ||
| 375 | id => 'syntax_error_or_access_rule_violation', | ||
| 376 | }, | ||
| 377 | '42601' => { | ||
| 378 | id => 'syntax_error', | ||
| 379 | group => 'syntax', | ||
| 380 | class => 'Syntax', | ||
| 381 | }, | ||
| 382 | '42501' => { | ||
| 383 | id => 'insufficient_privilege', | ||
| 384 | }, | ||
| 385 | '42846' => { | ||
| 386 | id => 'cannot_coerce', | ||
| 387 | }, | ||
| 388 | '42803' => { | ||
| 389 | id => 'grouping_error', | ||
| 390 | }, | ||
| 391 | '42830' => { | ||
| 392 | id => 'invalid_foreign_key', | ||
| 393 | }, | ||
| 394 | '42602' => { | ||
| 395 | id => 'invalid_name', | ||
| 396 | }, | ||
| 397 | '42622' => { | ||
| 398 | id => 'name_too_long', | ||
| 399 | }, | ||
| 400 | '42939' => { | ||
| 401 | id => 'reserved_name', | ||
| 402 | }, | ||
| 403 | '42804' => { | ||
| 404 | id => 'datatype_mismatch', | ||
| 405 | }, | ||
| 406 | '42P18' => { | ||
| 407 | id => 'indeterminate_datatype', | ||
| 408 | }, | ||
| 409 | '42809' => { | ||
| 410 | id => 'wrong_object_type', | ||
| 411 | }, | ||
| 412 | '42703' => { | ||
| 413 | id => 'undefined_column', | ||
| 414 | class => 'NoSuchColumn', | ||
| 415 | group => 'no_such', | ||
| 416 | }, | ||
| 417 | '42883' => { | ||
| 418 | id => 'undefined_function', | ||
| 419 | }, | ||
| 420 | '42P01' => { | ||
| 421 | id => 'undefined_table', | ||
| 422 | class => 'NoSuchTable', | ||
| 423 | group => 'no_such', | ||
| 424 | }, | ||
| 425 | '42P02' => { | ||
| 426 | id => 'undefined_parameter', | ||
| 427 | }, | ||
| 428 | '42704' => { | ||
| 429 | id => 'undefined_object', | ||
| 430 | }, | ||
| 431 | '42701' => { | ||
| 432 | id => 'duplicate_column', | ||
| 433 | }, | ||
| 434 | '42P03' => { | ||
| 435 | id => 'duplicate_cursor', | ||
| 436 | }, | ||
| 437 | '42P04' => { | ||
| 438 | id => 'duplicate_database', | ||
| 439 | }, | ||
| 440 | '42723' => { | ||
| 441 | id => 'duplicate_function', | ||
| 442 | }, | ||
| 443 | '42P05' => { | ||
| 444 | id => 'duplicate_prepared_statement', | ||
| 445 | }, | ||
| 446 | '42P06' => { | ||
| 447 | id => 'duplicate_schema', | ||
| 448 | }, | ||
| 449 | '42P07' => { | ||
| 450 | id => 'duplicate_table', | ||
| 451 | }, | ||
| 452 | '42712' => { | ||
| 453 | id => 'duplicate_alias', | ||
| 454 | }, | ||
| 455 | '42710' => { | ||
| 456 | id => 'duplicate_object', | ||
| 457 | }, | ||
| 458 | '42702' => { | ||
| 459 | id => 'ambiguous_column', | ||
| 460 | }, | ||
| 461 | '42725' => { | ||
| 462 | id => 'ambiguous_function', | ||
| 463 | }, | ||
| 464 | '42P08' => { | ||
| 465 | id => 'ambiguous_parameter', | ||
| 466 | }, | ||
| 467 | '42P09' => { | ||
| 468 | id => 'ambiguous_alias', | ||
| 469 | }, | ||
| 470 | '42P10' => { | ||
| 471 | id => 'invalid_column_reference', | ||
| 472 | }, | ||
| 473 | '42611' => { | ||
| 474 | id => 'invalid_column_definition', | ||
| 475 | }, | ||
| 476 | '42P11' => { | ||
| 477 | id => 'invalid_cursor_definition', | ||
| 478 | }, | ||
| 479 | '42P12' => { | ||
| 480 | id => 'invalid_database_definition', | ||
| 481 | }, | ||
| 482 | '42P13' => { | ||
| 483 | id => 'invalid_function_definition', | ||
| 484 | }, | ||
| 485 | '42P14' => { | ||
| 486 | id => 'invalid_prepared_statement_definition', | ||
| 487 | }, | ||
| 488 | '42P15' => { | ||
| 489 | id => 'invalid_schema_definition', | ||
| 490 | }, | ||
| 491 | '42P16' => { | ||
| 492 | id => 'invalid_table_definition', | ||
| 493 | }, | ||
| 494 | '42P17' => { | ||
| 495 | id => 'invalid_object_definition', | ||
| 496 | }, | ||
| 497 | '44000' => { | ||
| 498 | id => 'with_check_option_violation', | ||
| 499 | }, | ||
| 500 | '53000' => { | ||
| 501 | id => 'insufficient_resources', | ||
| 502 | }, | ||
| 503 | '53100' => { | ||
| 504 | id => 'disk_full', | ||
| 505 | }, | ||
| 506 | '53200' => { | ||
| 507 | id => 'out_of_memory', | ||
| 508 | }, | ||
| 509 | '53300' => { | ||
| 510 | id => 'too_many_connections', | ||
| 511 | }, | ||
| 512 | '54000' => { | ||
| 513 | id => 'program_limit_exceeded', | ||
| 514 | }, | ||
| 515 | '54001' => { | ||
| 516 | id => 'statement_too_complex', | ||
| 517 | }, | ||
| 518 | '54011' => { | ||
| 519 | id => 'too_many_columns', | ||
| 520 | }, | ||
| 521 | '54023' => { | ||
| 522 | id => 'too_many_arguments', | ||
| 523 | }, | ||
| 524 | '55000' => { | ||
| 525 | id => 'object_not_in_prerequisite_state', | ||
| 526 | }, | ||
| 527 | '55006' => { | ||
| 528 | id => 'object_in_use', | ||
| 529 | }, | ||
| 530 | '55P02' => { | ||
| 531 | id => 'cant_change_runtime_param', | ||
| 532 | }, | ||
| 533 | '55P03' => { | ||
| 534 | id => 'lock_not_available', | ||
| 535 | }, | ||
| 536 | '57000' => { | ||
| 537 | id => 'operator_intervention', | ||
| 538 | }, | ||
| 539 | '57014' => { | ||
| 540 | id => 'query_canceled', | ||
| 541 | group => 'timeout', | ||
| 542 | class => 'QueryCanceled' | ||
| 543 | }, | ||
| 544 | '57P01' => { | ||
| 545 | id => 'admin_shutdown', | ||
| 546 | }, | ||
| 547 | '57P02' => { | ||
| 548 | id => 'crash_shutdown', | ||
| 549 | }, | ||
| 550 | '57P03' => { | ||
| 551 | id => 'cannot_connect_now', | ||
| 552 | }, | ||
| 553 | '58030' => { | ||
| 554 | id => 'io_error', | ||
| 555 | }, | ||
| 556 | '58P01' => { | ||
| 557 | id => 'undefined_file', | ||
| 558 | }, | ||
| 559 | '58P02' => { | ||
| 560 | id => 'duplicate_file', | ||
| 561 | }, | ||
| 562 | 'F0000' => { | ||
| 563 | id => 'config_file_error', | ||
| 564 | }, | ||
| 565 | 'F0001' => { | ||
| 566 | id => 'lock_file_exists', | ||
| 567 | }, | ||
| 568 | 'P0000' => { | ||
| 569 | id => 'plpgsql_error', | ||
| 570 | }, | ||
| 571 | 'P0001' => { | ||
| 572 | id => 'raise_exception', | ||
| 573 | }, | ||
| 574 | 'XX000' => { | ||
| 575 | id => 'internal_error', | ||
| 576 | }, | ||
| 577 | 'XX001' => { | ||
| 578 | id => 'data_corrupted', | ||
| 579 | }, | ||
| 580 | 'XX002' => { | ||
| 581 | id => 'index_corrupted', | ||
| 582 | }, | ||
| 583 | ); | ||
| 584 | |||
| 585 | sub error_handler { | ||
| 586 | my $string = shift; | ||
| 587 | |||
| 588 | my $dbh = shift; | ||
| 589 | my $code = $dbh->state; | ||
| 590 | my $error_info = $error_codes{$code}; | ||
| 591 | |||
| 592 | # prepare class | ||
| 593 | my $class = 'DBIx::Exception'; | ||
| 594 | if (my $class_ext = $error_info->{class}) { | ||
| 595 | $class .= '::' . $class_ext; | ||
| 596 | } | ||
| 597 | |||
| 598 | my $group = $error_info->{group}; | ||
| 599 | |||
| 600 | # prepare args | ||
| 601 | my @args = ( original => $string ); | ||
| 602 | if ($group eq 'constraint') { | ||
| 603 | # fk constraints, unique constraints etc | ||
| 604 | my ($constraint) = $string =~ /constraint "(.+)"/; | ||
| 605 | push @args, ( constraint => $constraint ); | ||
| 606 | my ($column_name) = $string =~ /column "(.+)"/; | ||
| 607 | if ($column_name) { | ||
| 608 | push @args, ( column => $column_name ); | ||
| 609 | } | ||
| 610 | |||
| 611 | } elsif ($group eq 'no_such') { | ||
| 612 | # wrong table, wrong column etc | ||
| 613 | my ($table_name) = $string =~ /relation "(.+)"/; | ||
| 614 | my ($column_name) = $string =~ /column "(.+)" of/; | ||
| 615 | push @args, ( table => $table_name ); | ||
| 616 | if ($column_name) { | ||
| 617 | push @args, ( column => $column_name ); | ||
| 618 | } | ||
| 619 | } elsif ($group eq 'syntax') { | ||
| 620 | my ($near) = $string =~ /near "(.+)"/; | ||
| 621 | push @args, ( near => $near ); | ||
| 622 | } | ||
| 623 | |||
| 624 | $class->throw(@args); | ||
| 625 | } | ||
| 626 | |||
| 627 | 1; | ||
| 628 | |||
| 629 | __END__ |