ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/SimpleDoc.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/SimpleDoc.pm (file contents):
Revision 1.1.2.3.2.2 by williamc, Thu Aug 10 14:40:10 2000 UTC vs.
Revision 1.1.2.3.2.3 by williamc, Thu Aug 17 15:58:41 2000 UTC

# Line 34 | Line 34
34   # restoregroup(name,parse) : restore group access setting (that before last change)
35   # doctype()             : return the (type,version) of the document
36   #                         as specified by the DocVersionTag
37 + # filenameref(string)   : A string to refer to the file in parse error messages
38 + #                         etc. Default is filetoparse
39   # --------------- Error handling routines ---------------
40   # verbose(string)       : Print string in verbosity mode
41   # verbosity(0|1)        : verbosity off|on
# Line 65 | Line 67 | sub doctype {
67          return ($self->{doctype},$self->{docversion});
68   }
69  
70 + sub filenameref {
71 +        my $self=shift;
72 +        if ( @_ ) {
73 +           $self->{filenameref}=shift;
74 +        }
75 +        return (defined $self->{filenameref})?$self->{filenameref}
76 +                                             :$self->filetoparse();
77 + }
78 +
79   sub _initdoc {
80          my $self=shift;
81          my $parsename=shift;
# Line 249 | Line 260 | sub parseerror {
260          my $string=shift;
261  
262          if ( $self->currentparsename() eq "" ) {
263 <                $self->error("Error In file ".$self->filetoparse."\n".$string);
263 >                $self->error("Error In file ".$self->filenameref."\n".$string);
264          }
265          else {
266           $line=$self->line();
267 <         print "Parse Error in ".$self->filetoparse().", line ".
267 >         print "Parse Error in ".$self->filenameref().", line ".
268                                          $line."\n";
269           print $string."\n";
270           exit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines