summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-28 13:45:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-28 13:45:48 +0000
commitbc45ce41590a23464acf3b62efacccf60e155a7c (patch)
tree2b59a5853cbac9df927d3d2cc7e0990efcba8857 /utf8.c
parentff385a1bad6ee8beb325a9f711f9e2773dba9aea (diff)
downloadperl-bc45ce41590a23464acf3b62efacccf60e155a7c.tar.gz
A little bit better error message for \pq, still
not good because the script context is not shown. p4raw-id: //depot/perl@15581
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 7c16826979..85a22a1ffd 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1543,8 +1543,12 @@ Perl_swash_init(pTHX_ char* pkg, char* name, SV *listsv, I32 minbits, I32 none)
Copy(pv, PL_tokenbuf, len+1, char);
PL_curcop->op_private = PL_hints;
}
- if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV)
+ if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
+ if (SvPOK(retval))
+ Perl_croak(aTHX_ "Can't find Unicode property definition \"%s\"",
+ SvPV_nolen(retval));
Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
+ }
return retval;
}