thinko in try/catch
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 27 Jul 2007 15:32:36 +0000 (15:32 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 27 Jul 2007 15:32:36 +0000 (15:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7585 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm

index 05d4e1e..dcb764c 100644 (file)
@@ -598,6 +598,7 @@ sub supercat {
                print "Location: $root/../../en-US/skin/default/xml/rdetail.xml?r=$id\n\n"
                        if ($type eq 'record');
                return 302;
+
        } elsif ($base_format eq 'marc21') {
 
                my $ret = 200;    
@@ -619,17 +620,17 @@ sub supercat {
                        print "Content-type: application/octet-stream\n\n";
                        print $r->as_usmarc;
 
-               } catch (Error) {
+               } otherwise {
                        
                        print "Content-type: text/html; charset=utf-8\n\n";
                        $apache->custom_response( 404, <<"                      HTML");
                        <html>
                                <head>
-                                       <title>$type $id not found!</title>
+                                       <title>ERROR</title>
                                </head>
                                <body>
                                        <br/>
-                                       <center>Sorry, we couldn't $command a $type with the id of $id in format $format.</center>
+                                       <center>Couldn't fetch $id as MARC21.</center>
                                </body>
                        </html>
                        HTML