ERRSTR(2) System Calls Manual ERRSTR(2)NAME
errstr, werrstr - description of last system call error
SYNOPSIS
#include <u.h>
#include <libc.h>
int errstr(char *err)
void werrstr(char *fmt, ...)
DESCRIPTION
When a system call fails it returns -1 and records a string describing the error in a per-process buffer. Errstr swaps the contents of
that buffer with the contents of the array err. Err should contain at least ERRLEN characters (defined in <libc.h>). Usually errstr will
be called with an empty string, but the exchange property provides a mechanism for libraries to set the return value for the next call to
errstr.
If no system call has generated an error since the last call to errstr with an empty string, the result is an empty string.
The verb r in print(2) calls errstr and outputs the error string.
Werrstr takes a print style format as its argument and uses it to format a string to pass to errstr. The string returned from errstr is
discarded.
SOURCE
/sys/src/libc/9syscall
/sys/src/libc/9sys/werrstr.c
DIAGNOSTICS
Errstr always returns 0.
SEE ALSO intro(2), perror(2)ERRSTR(2)
Check Out this Related Man Page
Razor2::Errorhandler(3pm) User Contributed Perl Documentation Razor2::Errorhandler(3pm)NAME
Razor::Errorhandler - Error handling mechanism for Razor.
SYNOPSIS
package Foo;
use Razor::Errorhandler;
@ISA = qw(Razor::Errorhandler);
sub alive {
..
..
return
$self->error ("Awake, awake! Ring the alarum bell.
Murther and treason!", $dagger)
if $self->murdered($king);
}
package main;
use Foo;
my $foo = new Foo;
$foo->alive($king) or print $foo->errstr();
# prints "Awake, awake! ... "
DESCRIPTION
Razor::Errorhandler encapsulates the error handling mechanism used by the modules in Razor bundle. Razor::Errorhandler doesn't have a
constructor and is meant to be inherited. The derived modules use its two methods, error() and errstr(), to communicate error messages to
the caller.
When a method of the derived module fails, it calls $self->error() and returns to the caller. The error message passed to error() is made
available to the caller through the errstr() accessor. error() also accepts a list of sensitive data that it wipes out (undef'es) before
returning.
The caller should never call errstr() to check for errors. errstr() should be called only when a method indicates (usually through an undef
return value) that an error has occured. This is because errstr() is never overwritten and will always contain a value after the occurance
of first error.
METHODS
error($mesage, ($wipeme, $wipemetoo))
The first argument to error() is $message which is placed in $self->{errstr} and the remaining arguments are interpretted as variables
containing sensitive data that are wiped out from the memory. error() always returns undef.
errstr()
errstr() is an accessor method for $self->{errstr}.
AUTHOR
Vipul Ved Prakash, <mail@vipul.net>
SEE ALSO Razor::Client(3)perl v5.14.2 2005-08-03 Razor2::Errorhandler(3pm)
Hello;
I was trying to set up a mysql database using following script, but never went through. The code seems fine without any syntax error as I tested it:
perl -c Brapa0101-db.pl
Brapa0101-db.pl syntax OKHowever, whenever I run it, an error message was tossed out:
DBD::mysql::st execute... (7 Replies)
Hello All,
I'm trying to match some user input.
The User input will be a FULL Path, a Command/Script Name, and any options they choose...
I was able to get this to Match somewhat but I want to be able to print an Error if, for example, the user enters a trailing "/"
after the Command_name... (9 Replies)
Hello
I need your kind help for configuring email on Solaris 10 so I can send reports from the system to my management and my colleagues.
I have the IP address of the email server of my company and the port 2525. I went through many documents online with no luck.
Can any one help me... (4 Replies)
hi All,
i have to modify a shell script written in Perl. i have to use execute immediate within this. i have to create a temporary table but it should have name like ar_data_$mmyyyy , how can i achieve this?
any help on this would be highly appriciated. (6 Replies)
Hi Team,
I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Need assistance
Below script get the output correctly
I want to convert the date format .Below is the output . Any idea ?
#!/usr/bin/perl -w
use DBI;
# Get a database handle by connecting to the database
my $db = DBI->connect(... (3 Replies)
Hi all,
I'm quite new to Solaris and I've been searching around everywhere to try and find the root of my Oracle DB install problem. It quits immediately when it runs isainfo when it gets a return of 3md64. To me this looks like there is a typo where ever isainfo pulls it's info from, but I... (13 Replies)
Hi, I just would like to write a perl script , this perl script do the following .
Check the parameter $data in a mysql database ( with user ID and password ) , if the $data is exist then return true , if not then return false , would advise how to write this script ? thanks
---------- Post... (1 Reply)
How do I find out the SSL cert info on the local server?
How do I know if an ssl cert is installed on local server?
How it was issued to?
Who was the issuer?
What's the expiration date?
Any other relevant information? (1 Reply)
Hi,
I am an occasional PERL user. I am trying to call a sub routine (passing parameters) in perl module from a driver .pl file. I have been "tinkering" for a while now and have confused myself.
Could someone please look at the code below and spot where I am going wrong.
testPerl.pl
... (0 Replies)
Hi,
I am currently writing a perl module that will be passed queries from other scripts and use DBI to execute them on an Oracle Database. The problem I have is when it comes to the return.
I am currently getting this from my code:
FIELDA FIELDB FIELDC ... (6 Replies)
Hello,
I am trying to write a perl script to access Solid LDAP database using JDBC.
The script connects to the database but gives below error while running sql prepare command :
try.pl
connecting
preparing................
DBD::JDBC::db prepare failed: java.io.IOException:... (0 Replies)
Hi All,
i have problem here whenever i run this perl script that is pasted here, it inserts a negative number in place of PO_nbr
.
What the script does is reads a pipe delimited file and then using some values on the file it will query db to get few other values and then it inserts the... (4 Replies)
Hallo Team
I can perform the task manually but i would like to automate this process. ok here goes. I have a perl script which runs every Wednesday every week and the name of the script is check_19.pl
This is how the script looks like :
#!/usr/bin/perl -w
#use strict;
use DBI;
#... (1 Reply)
Hello again people,
I currently searching for a code/script that will allow it to check if a specific port is open, lets say 123. Found a public script on a ftp but I dont know how and what to modify in it to suit my needs. (I think this is a evil code and I want to use it as an example).
... (3 Replies)