Branch: Tag:

2002-03-09

2002-03-09 18:28:02 by Martin Nilsson <mani@lysator.liu.se>

throw -> error

Rev: lib/modules/Cache.pmod/Storage.pmod/Base.pike:1.7
Rev: lib/modules/Cache.pmod/cache.pike:1.9
Rev: lib/modules/Calendar_I.pmod/Gregorian.pmod:1.27
Rev: lib/modules/Crypto/_rsa.pike:1.6
Rev: lib/modules/Crypto/dsa.pike:1.11
Rev: lib/modules/Crypto/randomness.pmod:1.21
Rev: lib/modules/Crypto/rsa.pike:1.31
Rev: lib/modules/Filesystem.pmod/Tar.pmod:1.13
Rev: lib/modules/Getopt.pmod:1.19
Rev: lib/modules/Graphics.pmod/Graph.pmod/create_bars.pike:1.7
Rev: lib/modules/Graphics.pmod/Graph.pmod/create_graph.pike:1.9
Rev: lib/modules/Graphics.pmod/Graph.pmod/create_pie.pike:1.8
Rev: lib/modules/Languages.pmod/PLIS.pmod:1.14
Rev: lib/modules/Parser.pmod/XML.pmod/Tree.pmod:1.15
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.62
Rev: lib/modules/Protocols.pmod/NNTP.pmod:1.10
Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.20

1:   // Not yet finished -- Fredrik Hubinette   // RFC 1035    - //! $Id: DNS.pmod,v 1.61 2002/01/13 18:44:33 marcus Exp $ + //! $Id: DNS.pmod,v 1.62 2002/03/09 18:27:04 nilsson Exp $      #pike __REAL_VERSION__   
40:    string mklabel(string s)    {    if(strlen(s)>63) -  throw(({"Too long component in domain name\n",backtrace()})); +  error("Too long component in domain name.\n");    return sprintf("%c%s",strlen(s),s);    }   
189:       default:    if((~len)&0xc0) -  throw(({"Invalid message compression mode\n",backtrace()})); +  error("Invalid message compression mode.\n");    if(next==-1) next=pos+2;    pos=((len&63)<<8) + msg[pos+1];    continue;
377:    if(!port)    port = 53;    if(!udp::bind(port)) -  throw(({"DNS: failed to bind port "+port+".\n",backtrace()})); +  error("DNS: failed to bind port "+port+".\n");    udp::set_read_callback(rec_data);    }   
531:    resolv_conf = "nameserver 127.0.0.1";    }   #if 0 -  throw(({ "Protocols.DNS.client(): No /etc/resolv.conf!\n", -  backtrace() })); +  error( "Protocols.DNS.client(): No /etc/resolv.conf!\n" );   #endif /* 0 */    }   
972:    void create(void|string|array(string) server, void|string|array(string) domain)    {    if(!udp::bind(0)) -  throw(({"DNS: failed to bind a port.\n",backtrace()})); +  error( "DNS: failed to bind a port.\n" );       udp::set_read_callback(rec_data);    ::create(server,domain);    }   };