(assert-error) tests errors and error messages
I wrote (assert-error) to make sure that a function generates an
error, and verify the error message. What do you think? Below is the
definition and a few test cases, for Emacs 22.1.50.
(defmacro assert-error (form &optional regexp)
"FORM must signal an error. Signal an error otherwise.
Additionally, the error message must match REGEXP.
Case is ignored while matching REGEXP."
(let ((msg (make-symbol "msg"))
(ok (make-symbol "ok"))
(res (make-symbol "res")))
`(let ((,ok nil))
;; Evaluate FORM and save the result.
(set ',res ,form)
;; This runs when FORM signals an error of any kind.
(set ',ok t)
(set ',msg (error-message-string err))))
(error "Did not signal an error: %s (returned %s)"
;; Here we know that FORM signaled an error, and that the
;; caller wants to check the error message.
(let ((case-fold-search t))
(string-match ,regexp ,msg))
(error "Error message does not match \"%s\": \"%s\""
;; Test assert-error, mostly by running it against itself.
(assert-error (assert-error nil) "did not signal.*nil")
(assert-error (assert-error t) "\\bt\\b")
(as...error vb : 3000 : Reserved error (-5400) there is no message for this error
i have a problem when i connect an access 97 database with an text file
"3000 Reserved error (-5400); there is no message for this error."
The attachment is an example of a textfile that i want to connect through vb
vb code :
strtable = "FileName"
strconnect = "Text;HDR=NO;IMEX=2;FMT=Fixed;Database=c:\temp"
strSourcetable = "MAILGV2939.TXT"
Set tdfLinked = dbsTemp.CreateTableDef(strTable)
tdfLinked.Connect = strConnect
tdfLinked.SourceTableName = strSourceTable
what is the solution to this problem
with kind regards
...Error Number 3000: Reserved Error (-3002); there is no message for this error
I've been moving code about to tidy it up and this error is occuring.
I have tracked it down to a set querydef command, i have properly
specified a database and am using correct syntax for the set command
but this error is popping up.
Any ideas why?
Try to decompile the database (command-line switch /decompile)
> I've been moving code about to tidy it up and this error is occuring.
> I have tracked it down to a set querydef command, i have properly
> specified a database and am using correct syntax for the set command
> but this error is popping up.
> Any ideas why?
> Please help.......
Bas Cost Budde, Holland
Er... gonna sound dumb now but how do I do that?
Ok... found out how... easy really.
Unfortunately, there is no change in the behaviour of the code.
Still could use some help here...
I've now decomplied...
Then i exported all code...
Then i compacted and repaired the db
Then i reimported all the code
Then i compacted and repaired again
It still doesn't want to work!
Ok... here it is - i was being thick (no surprise there).
I had a problem in my SQL in that the SQL was designed to do a
TRANSFORM to create a nice crosstab query.
I later added an INTO command to the SQL to get the output into a temp
This is not allowed for TRANSFORM queri...Error message after posting a message
I just posted a message on the comp.text.tex forum and after I was
told that the post has been successful, I get the following message
when I try to access my message. I have seen this sort of message
before. Any idea what this means. I do not want to send a duplicate
post as yet because this all might be some glitch in the system.
There are no more messages on this topic. All messages in this topic
may have expired or been deleted.
...Error: AgentSocketPullInput error message
I'm getting the following message repeated in the /var/adm/snmpd.log on
HP-UX 11.11 server:
AgentSocketPullInput: short read pending on socket close, data
at line 491 in file ../common.c
I've been surfing around for the info but haven't had any luck finding
a reference to this error message and what it might mean? I've done a
stare 'n compare against a working snmpd.conf that's working just fine.
Would anybody have a cluegram as to where I can look for some idea what
this message is telling me...?
...Error returned with no error message
I am trying to access a Transform Data Task in a DTS by double
clicking it. When I do, I get a message similar to
"HResult of 0x80004005 (-2147467259) returned
Unexpected error occurred. An error was returned without an error
and the properties screen does not appear.
Firstly this has got to be the most useless alert ever to appear on my
screen, but more importantly what can I do about it? I cannot execute
the step either as I get the same message. I thought that the DTS may
have become corrupted but it is also happening when I create new DTS
Can anyone throw me a clue?
...A subtle error in error message parsing db2 udb v8.1.9
Apparently db2 provides two forms of an error message, one more readable
then the other. The readable one is apparently parsed from the other
one. When db2 parses the error message shown below, it lets the extra
semicolons confuse it. I believe the correct parse to be (especially
because when I deleted the semicolon in question the procedure compiled):
An unexpected token ";" was found following "turn str_out;
end". Expected tokens may include: "END-OF-STATEMENT"
The actual error message was:
DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ;;turn str_out;
Message: An unexpected token "" was found following "". Expected tokens
may include: "turn str_out".
...Why do I have this message when declaring variableof type mwArray in my Borland C++ (6.0) application using Matlab dll:[Linker Fatal Error] Fatal: Type index 1275002112 is bad in module F:\Pro..
I want to use a dll compiled from Matlab 7.0, in my application coded
with Borland C++ (6.0).
I generate the xxxxxx.dll, and compiled de xxxxxxx.lib.
In my cpp file I want to declare a mwArray variable and I have this
[Linker Fatal Error] Fatal: Type index 1275002112 is bad in module
Is there something things wrong with the file: mclcppclass.h ??
Appreciate your help.
...IO failed for VU 1-142 on connection 141/75 with error 64: (Error message not found)
While conducting 200 users run i am encountring the following error
"IO failed for VU 1-142 on connection 141/75 with error 64: (Error
message not found)". After encountring this error the Load ( Virtual
users) dropped to zero and the run was failed. Any idea to solve this
My ini setting are as follows..
I changed the TCP parameters in the OpenSTA machine.
TcpWindowSize - 65535
TcpMaxDataRetransmissions - 20
TcpMaxConnectAttempts - 10
TcpMaxConnectRetransmissions - 20
MaxUserPort - 65535
TCPnumconnections - 16777214
...EvaluateFunction error .... fails with no error message
When I attempt to make a call to a a function in a matlab assembly built for .net, an exception is thrown with error message (with no message!):
.... MWMCR::EvaluateFunction error ...
StackTrace: at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(String functionName, Int32 numArgsOut, Int32 numArgsIn, MWArray argsIn)
at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(Int32 numArgsOut, String functionName, MWArray argsIn)
at RevScenarios.RevScenarios.generateScenarios(Int32 numArgsOut, MWArray NetRevenue, MWArray AdSpend, MWArray ClicksCharged, MWArray AvgPosition, MWArray NumScenarios)
The error I believe has something to do with the MWArray assembly.
This error only occurs when using the 64bit version of MWArray.dll. Using a 32bit version of the assembly works just fine. Both MCR v710 32bit and 64bit ARE installed on the machine when it's running.
What could be causing this?
...Mapping error codes to error messages
I need to make an error handling framework to be used by C++
applications running on HP-UX. In this, the application error codes can
be mapped to pre-defined error messages. The framework would have C++
exception classes for error information propagation. I however have no
clue on how to map the error codes to the messages, and efficiently
access the messages through a simple mapping class or function. I know
this is not exactly a UNIX question that we are discussing, but is
anybody aware of any implementation techniques. Should it necessarily
be a static array indexed by error codes or some r...Error 680
My PC runs Windows XP Pro and i need to bypass the pop-up error message
'680' (no dial tone)
This computer is a self-running station, totally automatic.
When Windows displays this message, the computer waits for an human
activity: clic on the button to confirm that I have seen the message.
I can't accept it because this error message blocks my automatic
What can I do to bypass it ? I would like not to display this kind of
pop-up message and keep the system running automatically, or validate it
automatically (so, the computer can keep on running its processes)
Thank you for your help.
Direct access to this group with http://web2news.com
...Reserved error (-1524); there is no message for this error.
I am trying to run a pretty simple select query in Access 2007, and I
keep getting the error message "Reserved error (-1524); there is no
message for this error." There are no linked tables in the database -
the design of the database is very simple.
I should also note that I ran the "compact and repair database" tool
and I am still getting the same error message.
"adampierce" <email@example.com> wrote in message
>I am trying to run a pretty simple select query in Access 2007, and I
> keep getting the error message "Reserved error (-1524); there is no
> message for this error." There are no linked tables in the database -
> the design of the database is very simple.
> I should also note that I ran the "compact and repair database" tool
> and I am still getting the same error message.
> Any thoughts?
Just a guess.....
Do you have any field names that use "reserved" words?
Date, Name, Min, Max, Sum, Where, etc
Would you post the query?
I don't think I'm using any reserved words...Here is the SQL:
SELECT E_CURRENT_DATA.Prefix, E_CURRENT_DATA.LastName,
E_CURRENT_DATA.FirstName, E_CURRENT_DATA.Address, E_CURRENT_DATA.City,
WHERE (((E_CURRENT_DATA.Volunteer)=False) AND
((E_CURRENT_DATA.Absent)=Fa...Automation Error Unspecified Error Message
I'm running a query and get the error in the subject line above. This
is the query:
strSQL = "SELECT XL_Import.Gate, XL_Import.Region, XL_Import.Section,
XL_Import.[Charter Fields], " & _
"XL_Import.[Data Value], XL_Import.[Matrix 1 Table],
XL_Import.[Matrix 1 Attribute] " & _
"FROM XL_Import " & _
"WHERE (XL_Import.Section = 'DF" & x & "') AND (XL_Import.
[Data Value]<>'0') AND " & _
"(XL_Import.[Matrix 1 Table]= 'ProductOption') AND (XL_Import.
[Matrix 1 Attribute] ='package direction');"
If I paste this into an accesss query it runs fine. Any ideas what is
going on? I'm using Access 2003.
I simplified your query by removing parens and the preceding table name
for each field:
strSQL = _
"SELECT Gate, Region, Section, [Charter Fields], " & _
"[Data Value], [Matrix 1 Table], [Matrix 1 Attribute] " & _
"FROM XL_Import " & _
"WHERE Section Like 'DF*' AND [Data Value]<>'0' AND " & _
"[Matrix 1 Table]= 'ProductOption' AND [Matrix 1 Attribute] ='package
I also combined your X variable with a Like and * --
WHERE Section Like 'DF*' AND...
What I would do if I were you, starters, is to remove the Where clause
and select like the top 1
SELECT Top 1 Gate, Region, Section, [...Intercepting error Access error messages
Is it possible to intercept an error message, generated by Access, and
replace it with your own warning. For example entering a duplicate entry
for a key field?
Use the Before Update event of the control in the form to check for
Set Cancel = true, undo the edit and output a message if there is an error.
There are example in Access help under beforeupdate.
"Geoff" <firstname.lastname@example.org> wrote in message
> Is it possible to intercept an error message, generated by Access, and
> replace it with your own warning. For example entering a duplicate entry
> for a key field?
Check out the Form_OnError event.
Well, you can definitely write VBA code to intercept Access errors and do
your own thing in response to them instead of, or in addition to, whatever
Access was going to do. So sure, you could display your own message instead
In addition -- I've never done this, but I'm pretty sure I've read about
it -- you can register your own error numbers and error descriptions. So I
suppose once you've done that, you can intercept Access' error and Raise
your own. But I repeat, I've never done it so I don't know what the
problems might be.
Bob Bridges, email@example.com, cell 336 382-7313
(hotel) 612 869-7704 xt 118, fax 612 869-7383
/* A crooked politici...ERROR() : Multi-line error messages
I am working with this program where I scan lots of
text strings and check their formats. If an error
is found, the program terminates while printing
an error message to screen as
One of the strings is required to be on the letter/digit
I have seen that there is a risk that the users either
hit the wrong keys (hits 'O' instead of '0') or read the
alphanumeric codes wrong ('l' instead of '1') when they
enter them, so I want to be able to check the entered
codes and display an error message like
"Error in parameter SomeCode. Expects format 'ABC123'.
Found letter 'l' (lowercase 'L') in digit position 1"
The text in my own code is a little bit more elaborate,
it prints the code that was actually found and goes into
some details about where the error might have originated etc.
These sorts of error messages quickly become
too long to fit comfortably into one line in the
How can I break the error message up to appear over
several lines when I use the function ERROR?
"Rune Allnor" <firstname.lastname@example.org> writes:
> I am working with this program where I scan lots of
> text strings and check their formats. If an error
> is found, the program terminates while printing
> an error message to screen as
> These sorts of error messages quickly become
> too long to fit comfortably i...Reserved Error (-1517): There is no message for this error.
I have been getting this error on some of the frontends when
attempting to create new records. I haven't been able to find a list
of errors to even begin my troubleshooting. Can someone help? Rosy
We are running Windows 2000 Server and Win 2000 on the terminals.
email@example.com (Karen) wrote:
>I have been getting this error on some of the frontends when
>attempting to create new records. I haven't been able to find a list
>of errors to even begin my troubleshooting. Can someone help?
I've noticed this problem several times when I've added a foreign key to a table in
the backend which was inserted into the middle of a table. Everything would work fine
for days or weeks until the backend was compacted. Then the FE would puke with the
-1517 error whenever that particular table was accessed. But deleting the link and
recreating the link or compacting the FE made it work again.
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
...Reserved Error (-7711); there is no message for this error
I am trying to pick out data from an OBDC Source so i have created a
link table to it. I have created a query to look at the data in this
table. I have chosen all the fields that i require. There is a date
field in there which looks at sets of data for a week. If i go into
the query design and actually type in the criteria of the date in
this format it works year-month-day (2004-02-09).
So i have tried to put a text box in to be able to type the date in
and be able to search for. This doesnt work. This is the SQL i am
using. Its really basic yet cant see the problem!
SELECT CTCH_WK.CELLID, CTCH_WK.WEEKOF, CTCH_WK.BSCID,
CTCH_WK.TOT_NORMATTS, CTCH_WK.TOT_NORMSEIZ, CTCH_WK.TOT_RFLOSSES,
CTCH_WK.TOT_MISCDROP, CTCH_WK.TOT_DROPQDL, CTCH_WK.TOT_DROPQUL,
CTCH_WK.TOT_DROPSSDL, CTCH_WK.TOT_DROPSSUL, CTCH_WK.TOT_DROPTA INTO
WHERE (((CTCH_WK.WEEKOF)=[Type In The Week Eg 2004-02-09]));
Can anyone see why it doesnt work, but works fine if you put it
directly into the query. Obviously i dont want to do that for every
query i want to run as it would be a pain!
On 19 Feb 2004 07:04:52 -0800, Mark Eden wrote:
> I am trying to pick out data from an OBDC Source so i have created a
> link table to it. I have created a query to look at the data in this
> table. I have chosen all the fields that i require. There is a date
> field in there which looks at sets of data for a week. If i go into
> the query design and actually type in the criteria of the date..."Oracle error occurred, but error message could not be retrieved from Oracle" error when restarting application
we're using Oracle 10g, in combination with Delphi (7). Application
uses Oracle client dll (oraociei10.dll).
Quick explenation about the structure (All files are on the network):
- A launcher application is started by the client. The launcher
application checks an .ini file for the current application versie
(.exe filename with a version postfix, e.g. "Application_112.exe"). The
launcher starts the executable specified in the .ini file. In this way
we can "release" by putting a new .exe file and updating the .ini file.
In our application we've got the functionality to restart the
application when a new version is available. If the application
detects there is a new version (by checking the .ini file) the user can
restart the application. The next thing happens on a restart:
- Application starts the launcher again, the handle of the application
- Application closes itself
- Launcher waits until the application handle is gone
- Launcher restarts application again (new version).
When starting the application again, oracle generated the beautiful:
"Oracle error occurred, but error message could not be retrieved from
message. Initial thought was that the Oracle client was not unloaded,
so we made the launcher wait up to 60 seconds after the application was
closed and before the application is started again. But even then the
Detail: When not using the oracle client , but the "n...Locally working XSLT fails on host with message "Sablotron error on line 1: XML parser error 4: not well-formed"
I have managed (with your help!) to make a working XSLT stylesheet; it
works fine locally (Windows Apache + PHP with Sablotron 1.0), but it
fails on the remote host (FreeBSD Apache + PHP with Sablotron 1.0) with
Warning: Sablotron error on line 1: XML parser error 4: not well-formed
(invalid token) in /...host...path.../page.php on line 28
FAILURE : XML parser error 4: not well-formed (invalid token) ; error
code is 2
Line 28 (of page.php) is the line with the call to xslt_process, while
line 1 (of the stylesheet) reads:
<?xml version="1.0" encoding="iso-8859-1"?>
What can possibly be wrong?
Note: I have of course some PHP code which sets the correct directory
depending on the machine we are on (local or remote).
Martin Plantec wrote:
> Warning: Sablotron error on line 1: XML parser error 4: not well-formed
> (invalid token) in /...host...path.../page.php on line 28
> FAILURE : XML parser error 4: not well-formed (invalid token) ; error
> code is 2
> Line 28 (of page.php) is the line with the call to xslt_process, while
> line 1 (of the stylesheet) reads:
> <?xml version="1.0" encoding="iso-8859-1"?>
> What can possibly be wrong?
I would guess that some path is wrong and somehow you don't pass in the
XML and/or the stylesheet you want.
Encouraged by your help, I tried...How to use a custom error message instead of Error#
I have a report that I run which consists of two subreports.
Occasionally, one or the other reports do not have valid recordsets due
to a parameter query based on date.
Right now, if there are no records that match that date, I get the
generic "Error#" message. I want the report to go ahead and print even
if there are no records. Is there any way to have the "error#" message
read "No loads for today" intead?
Report Name: rptOutboundAlex-ByDate
Fields queried on the report: ShipDate, DestinationID, VendorPO,
ProductTypes, ProductForm, Carrier, CarrierPO, Notes
> I have a report that I run which consists of two subreports.
> Occasionally, one or the other reports do not have valid recordsets due
> to a parameter query based on date.
> Right now, if there are no records that match that date, I get the
> generic "Error#" message. I want the report to go ahead and print even
> if there are no records. Is there any way to have the "error#" message
> read "No loads for today" intead?
> Report Name: rptOutboundAlex-ByDate
> Fields queried on the report: ShipDate, DestinationID, VendorPO,
> ProductTypes, ProductForm, Carrier, CarrierPO, Notes
-----BEGIN PGP SIGNED MESSAGE-----
In the report's module, in the section that holds the subreport, check
if the subreport has data. If not, hide the subreport. Underneath the
subreport put...Re: Segmentation error: was: SAS Error Message
Short answer: this probably is not a problem with SAS.
Segmentation errors usually arise when there is a bug in the program.
Have you run the shell script from an interactive session to verify it
Are you either writing the shell script, or writing a parameter file for
the shell script from within your SAS session? If so, look again at the
syntax of the created script or inclusion file.
Usually, these errors occur where array references are out of bounds or
use pointers that are corrupt or uninitialised.
Modifying your shell script with a series of PrintF() statements will
help y...Custom error message for Runtime error 3022
I am trying trap Runtime error 3022 (duplicates) in the click event of
a command button that closes the form. I have code in the Form_Error
event that does a good job of providing a more meaningful error message
than the default. It works in every situation except when the user
clicks the close button. I am using Me.Dirty=False to force a save but
if there are duplicates I just get the standard Runtime 3022 error
message. I am wondering why the Form_Error event is not triggered.
Here are the two relevant subs:
First the Form_Error Sub...
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Dim strMsg As String
Dim Group As String
Dim Selection As Integer
Const conDuplicateKey = 3022
Group = DLookup("[Name]", "tblGroups", "[GroupID] = " _
If DataErr = conDuplicateKey Then
' Don't show built-in error messages
Response = acDataErrContinue
strMsg = "You have already entered hours for " & Group & vbCr
' Show a custom error message
MsgBox strMsg, vbOKOnly, "Duplicate Value"
If Response = vbOK Then
And the Close button's Click event
Private Sub cmdClose_Click()
Me.Dirty = False
DoCmd.Close acForm, Me.Name, acSaveYes
I tried putting a On Error GoTo statement with a select case that
tested the Err.Number and then had similar code to Form_Error sub above
to produce a custom error messa...Mapping error codes to error messages #2
I need to make an error handling framework in which application error
codes can be mapped to pre-defined error messages. The framework would
have C++ exception classes for error information propagation. I however
have no clue on how to map the error codes to the messages, and
efficiently access the messages through a simple mapping class or
function. I know this is not exactly standard C++ that we are
discussing, but is anybody aware of any implementation techniques.
Should it necessarily be a static array indexed by error codes or some
rehash of the error codes.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
I would use something like std::map<unsigned int, std::string>. The
unsigned int would be the error code and the std::string would be the
message for that error code.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
> I need to make an error handling framework in which application error
> codes can be mapped to pre-defined error messages. The framework would
> have C++ exception classes for error information propagation. I however
> have no clue on how to map the error codes to the messages, and
> efficiently access the messages through a simple mapping class or
> function. I know this is not exactly standard C++ that we are
> discussing, but...