Weird! error handling not functioning

hi all
we have method A:
  public int issueItemWorkOrder( String sWORKON ) throws SQLException, Exception {calling method B:
  public float getQtyAvailable( String sITEM ) throws SQLException, Exception {method B raises an exception that is not being caught by method A. Any ideas?
code below
thanks for any help
  public float getQtyAvailable( String sITEM ) throws SQLException, Exception {
// --------->sintax error on purpose
          fQtyAvailable = rs.getFloat( "QTYSTK" ) - rs.getFloat( "QTYMIN" );
        else {
          fQtyAvailable = 0;
      catch( SQLException sqle ) { // this error is raised
        error  = "SQLException: get quantity available failed possible record does not exist. ";
        error += sqle.toString();
        throw new SQLException( error );
      catch( Exception e ) { // this error is raised
        error  = "An exception occured while getting quantity available record. ";
        error += e.toString();
        throw new Exception( error );
      finally {
        return fQtyAvailable;
    else {
      error = "Exception: Connection to database was lost while checking item work order. ";
      throw new Exception( error );
  public int issueItemWorkOrder( String sWORKON ) throws SQLException, Exception {
// ------->calling fQtyAvailable should raise an error
       fQtyAvailable = getQtyAvailable( sITEMWORKORDER );
// --------> it not being caught, why????
      catch( SQLException sqle ) {
        error  = "SQLException: issue item work order failed, possible record does not exist. ";
        error += sqle.toString();
        throw new SQLException( error );
      catch( Exception e ) {
        error = "An exception occured while issueing item work order record. ";
        error += e.toString();
        throw new Exception( error );
      finally {
        return iRowCount;
    else {
      error = "Exception: Connection to database was lost.";
      throw new Exception( error );
  }

thanks rmorlok
I have read few books and could not find an explanation why having a "return statement inside the finally clause of a method which raises an exception" blocks the propagation of exceptions?
eg.
method issueItemWorkOrder calls method getQtyAvailable
1) The code below works fine, since we haven't got any return statement in the finally clause;
2) However, if we add a return statement inside the finally clause of getQtyAvailable, when an exception occurs inside getQtyAvailable, the exception does not propagate to issueItemWorkOrder, and the code inside issueItemWorkOrder continues normally, which is NOT CORRECT.
Any explanation why the return statement blocks the propagation of exceptions??
Thanks in advance for any assistance.
cheers
Trajano
  public void getQtyAvailable( String sITEM ) throws SQLException, Exception {
    PreparedStatement ps1 = null;
    ResultSet rs1 = null;
    if( con != null ) {
      try {
        // the following line of code throws an exception on purpose for testing     
        if( rs1.next() ) {
          fQtyAvailable = rs1.getFloat( "QTYSTK" ) - rs1.getFloat( "QTYMIN" );
      catch( SQLException sqle ) {
        error  = "SQLException: get quantity available failed possible record does not exist. ";
        error += sqle.toString();
        throw new SQLException( error );
      catch( Exception e ) {
        error  = "An exception occured while getting quantity available record. ";
        error += e.toString();
        throw new Exception( error );
      finally {
    else {
      error = "Exception: Connection to database was lost while checking item work order. ";
      throw new Exception( error );
  public void issueItemWorkOrder( String sWORKON ) throws SQLException, Exception {
    boolean bFirstRun = true;
    float fQtyStillRequired = 0, fQtyIssued = 0;
    int iIWOID = 0, iISOID = 0, iIWOSTATUS = 0, iISOSTATUS = 0, iWOSTATUS = 0;
    String sITEMWORKORDER = null;
    if( con != null ) {
      try {
          getQtyAvailable( sITEMWORKORDER );
      catch( SQLException sqle ) {
        error  = "SQLException: issue item work order failed, possible record does not exist. ";
        error += sqle.toString();
        throw new SQLException( error );
      catch( Exception e ) {
        error = "An exception occured while issueing item work order record. ";
        error += e.toString();
        throw new Exception( error );
      finally {
    else {
      error = "Exception: Connection to database was lost.";
      throw new Exception( error );

Similar Messages

  • Script Error : Handler Not Definied

    Hi Gurus,
    I try to play a Lingo Script with Director MX 2004 but i got
    this message: Script Error : Handler Not Definied
    The Debug stops at this line in my code: dosRegister
    "70BE7B1-13977F4"
    Is anything missing from my Xtras folder?
    I have DirectOS though.
    Any idea ??
    Thx

    I suspect you have a cast member that uses one of the three
    names in the
    list and it is not a check box. It's probably before the
    actual checkbox
    member in the cast so it's finding it first.
    Craig Wollman
    Lingo Specialist
    Word of Mouth Productions
    212-928-9581
    www.wordofmouthpros.com
    "ajrobson" <[email protected]> wrote in
    message
    news:etn9j1$op2$[email protected]..
    >I have a script that get a list of choosen check boxes,
    it was working fine
    >but
    > now when i press the button that calls the script i get
    a error saying
    > "script
    > error property not found" then it lists the line i have
    put a * next to
    > and
    > says #hilite
    >
    > This is the top part of that script and to my knowlegde
    i have not chnaged
    > any
    > of it and it worked before but now it does not, i also
    use a script almost
    > identical to this but use it for radiobuttons instead
    and the line is the
    > same
    > in that and that script works, can anybody tell me what
    as gone wrong?
    >
    >
    >
    > global err
    >
    > on CheckBoxState -- name of custom handler
    > TickedBoxes = [] -- a empty list will be filled where
    ever a checkbox is
    > ticked
    > CheckBoxNames = ["Dr no", "From russia with
    love","Casino royale" ]
    > repeat with i = 1 to 3 -- repeat for each checkbox
    > CurrentCheckbox = CheckBoxNames
    > ** if the hilite of member(CurrentCheckbox) then -- if
    currentcheckbox
    > hilite
    > is true (checked)...
    > append(TickedBoxes,CurrentCheckbox )
    > end if
    > end repeat
    > return TickedBoxes
    > end
    >

  • Exit from CIN within Error Handling Sub-Function

    I have a CIN which has the code divided betwee the CINRun() function, a number of other functions & a #included .C file. I want to put some error handling into my CIN, so if an error occurs I want execution to return from the CIN to LabVIEW immediately... however, my error handling is currently done in one of the other functions, and may be called from CINRun,
    functions, or the #included .C file. Is there any neat/handy/nice way of universally/globally breaking out of or bombing out of the CIN if the error handling code gets called?

    Michael.Johnson wrote:
    I have a CIN which has the code divided betwee the CINRun() function, a number of other functions & a #included .C file. I want to put some error handling into my CIN, so if an error occurs I want execution to return from the CIN to LabVIEW immediately... however, my error handling is currently done in one of the other functions, and may be called from CINRun,
    functions, or the #included .C file. Is there any neat/handy/nice way of universally/globally breaking out of or bombing out of the CIN if the error handling code gets called?
    You seem to want to do structured ecxeption handling. This however is something only really supported by C++ and other object oriented languages. Standard C can do that only with quite some header macro magic and in general is done in a way, patented by Borland, if I remember correctly. To make things more complicated, writing CINs in C++ is not supported by LabVIEW and requires quite some knowledge about your specific compiler environment and linker to get it right on your own, and no NI won't support C++ creation of CINs.
    You will prabably have to modify your C code quite a bit to get it the way you want. Considering that you will have to make more or less involved changes to your C code anyhow, I would recommend you look into creating a shared library instead and calling that through the Call Library Node. CINs are from the past and support for them will be getting less and less with time as it adds almost no advantages to shared libraries anymore and has some disadvantages in comparison, such as proprietary solution, difficult to support and possible compatibility issues in the future.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • ADF Custom error handler not working.

    Hi All,
    i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
    and do the entry in Databinding.cpx file
    *<Application ErrorHandlerClass="mypackage.classname"/>*
    i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
    code is following-
    package com.in.jagran.view.services;
        import java.sql.SQLException;
        import oracle.adf.model.BindingContext;
        import oracle.adf.model.binding.DCErrorHandlerImpl;
        import oracle.jbo.JboException;
        public class AclasErrorHandler extends DCErrorHandlerImpl {
          public AclasErrorHandler(boolean setToThrow) {
            super(setToThrow);
            System.out.println("Inside Error Handler class");
          public AclasErrorHandler() {
              super(true);
           // this(true);
           * Returns the message that will be reported to JSF for each error that occurs.
           * Returning "null" is the way the custom error handler signals that a given exception
           * should not be reported to the client.
          @Override
          public String getDisplayMessage(BindingContext ctx, Exception ex)
            if (ex instanceof oracle.jbo.ValidationException) {
              return super.getDisplayMessage(ctx, ex);
            else {
              // Extract and return the error message that has to be displayed
              Exception exception = ex;
              String message = "";
              // If this exception is an instance of JboException,
              // try to find the cause by recursing over the eventual causing exceptions
              if (exception instanceof JboException)
                Throwable[] exceptionList = ((JboException)exception).getExceptions();
                while (exception instanceof JboException
                        && exceptionList != null && exceptionList.length > 0)
                  exception = (Exception)exceptionList[0];
                  if (exception instanceof JboException) {
                    exceptionList = ((JboException)exception).getExceptions();
              // *** Special processing of SQLExceptions
              if (exception instanceof SQLException) {
                message = exception.getMessage();
                // Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
                int ind = message.indexOf("ORA-06512");
                if (ind > 0)
                  message = message.substring(0, ind);
              // *** If the the reason for the JboException was data creation exception then display the message
              // of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
              else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
                // Report the top exception
                message = ex.getMessage();
              // Otherwise report the message of the lowest exception in the hierarchy
              else {
                message = exception.getMessage();
              return message;
        }but it is not working for me.
    thanks in Advance.

    yes i have used dubugger.
    i have set break point to following line-
    return super.getDisplayMessage(ctx, ex);
    if (ex instanceof oracle.jbo.ValidationException) {
            return super.getDisplayMessage(ctx, ex);   
    }when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
    and i have added following code also in handler class
            @Override
               public void reportException(DCBindingContainer dCBindingContainer,
                                           Exception exception) {
    System.out.println(exception.getMessage());
                       super.reportException(dCBindingContainer, exception);
                   }now when i have done commit operation control go to here and println statement print follwoing error on log window.
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".

  • Director Player Error : Handler not found in object

    Hi,
    I have made an exe to run a video in Director. This was done using old version of director, 8.5 supposedly.
    When i try to run video through this exe, the video plays in background but i get the following error(snapshot attached):
    "Handler not found in object
    # openport
    Script Error. Continue?"
    I have installed shockwave player 8.5 and also put all the files from xtra folder to the folder where exe in lying but still i am getting the same error.
    Any help will be greatly appreciated.

    Looks like something in one of the scripts in your project that is being called but is not working correctly for some reason.
    Without seeing the code it's hard to tell what the problem may be. I'm wondering if there's one of the old-style line continuation characters that may be breaking the #openport handler somewhere in your scripts.

  • Error handling not available with linked servers

    Hello,
    I have a stored procedure which inserts data to a linked mysql Server. The table in mysql has a unique key and I try to insert a new record with a conflicting key.
    My problem is that I am not able to do an error handling because my script stops immediatly when the error in the SP occurs.
    The error message itself is ok. But why is the script cancelled? So I don't have a possibility to do some error handling. I am working against SQL Server 2000. No TRY CATCH is available.
    Here is my code:
    DECLARE @RC int
    DECLARE @ItemNr nvarchar(255)
    DECLARE @Hostname nvarchar(255)
    DECLARE @IpAdresse nvarchar(255)
    DECLARE @LogLevel int
    DECLARE @Message nvarchar(1000)
    DECLARE @LocalError int
    -- Error handling is working as expected
    PRINT 1/0
    SELECT @LocalError=@@ERROR
    IF @LocalError<>0
     PRINT 'Error'
    ELSE
     PRINT 'Success'
    SELECT @ItemNr='AN12326m', @Hostname='hostname' ,@IpAdresse='ipadresse', @LogLevel=99, @Message='Test', @RC=0
    -- Error handling does not work
    EXECUTE [Asset].[dbo].[p_kapaya_DbSync_InsertMySqlRecord]
       @AssetNr, @Hostname, @IpAdresse, @LogLevel, @Message OUTPUT, @RC OUTPUT
    -- The following code is not reached, when an error occurs because the execution of the script is cancelled
    SELECT @LocalError=@@ERROR
    IF @LocalError <>0
     PRINT @LocalError
    ELSE
     PRINT 'Success'
    Error Message
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' hat die Meldung '[MySQL][ODBC 5.1 Driver][mysqld-5.0.67-community-nt]Duplicate entry 'AN12326m' for key 1' zurückgeben.
    Meldung 7343, Ebene 16, Status 2, Prozedur p_kapaya_DbSync_InsertMySQLRecord, Zeile 57
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' konnte INSERT INTO für die [MSDASQL]-Tabelle nicht ausführen.
    Kind regards
    Patrick

    This is not unique to linked servers. When an error occurs, there are several actions that SQL Server can take. It can abort the batch, it can abort the current scope or it can just termintate the current statement. Any active transaction may or may not
    be rolled back. And this is not all.
    Which of these actions, SQL Server takes it is hard to predict, becuase the developers have to have rolled a dice on deciding which action to take. Although, if you have SET XACT_ABORT ON, it is more consistent: in this case, most errors aborts the batch
    and rolls back the transaction.
    To trap the error, you need to use TRY-CATCH which permits you to trap most (not all) errors. See here for a quick introduction:
    http://www.sommarskog.se/error_handling_2005.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Uncaught error handler (global error handling) not working in Chrome FP 10.1.103.22

    A few days ago I very happily discovered the new global error handling available in flash-player (FP) 10.1
    Now while all works well in Firefox (using Adobe's FP 10.1.102.64), nothing happens in Chrome (using Google's FP 10.1.103.22).
    I can disable Google's FP using the "about:plugins" page in Chrome, restart the browser, and then everything works since the browser falls back to the other flash plugin installed, which is again Adobe's FP 10.1.102.64.
    Is this a known bug?

    Don't tell me the uncaught error handler only works for a debugger version....??
    The documentation, which I read quite carefully, doesn't have a word on this. It suggests rather the opposite:
    "When content is running in a debugger version of the runtime, such as the debugger version of Flash Player or the AIR Debug Launcher (ADL), an uncaught error dialog appears when an uncaught error happens. For those runtime versions, the error dialog appears even when a listener is registered for the uncaughtError event. To prevent the dialog from appearing in that situation, call the UncaughtErrorEvent object's preventDefault() method."

  • Adobe PDF Handler not Functioning in Outlook 2010

    We have the following configuration:
    - A Citrix Presentation Server 4.5 environment running on Windows 2003.
    - Office 2010
    - Adobe Acrobat X  Pro version 10.1.0
    - Adobe PDF Preview Handler version 10.1.0.534
    The issue we have is the the PDF Preview Handler does not work within Outlook2010. We get a error to say the previewer is not available.
    I have tried the following:
    - Re-registered the C:\Program Files\Adobe\Acrobat 10.0\Acrobat\PDFPrevHndlr.dll
    - Resinstalled Acrobat X
    - Tried installing the latest PDFPrevHndlr.dll file available.
    - Tried installing a wide range of older versions of the PDFPrevHndlr.dll file available.
    I was not able to resolve the issue. I would be grateful is anyone can supply me with a fix or let me know if this is a known problem withy Adobe Acrobat X

    Acrobat X is not supported on Citrix Presentation Server 4.5
    Acrobat X is supported on,
    Citrix XenApp 5.0 with Win 2008 Server Enterprise edition x64-bit.
    Citrix XenApp 6.0 with Win 2008 R2 Server Enterprise edition x64-bit.
    Citrix XenApp 5.0 on Windows Server 2003 R2, Enterprise Edition, 32 bit, SP2.
    You can refer the Acrobat Enterprise Guide at,
    http://helpx.adobe.com/content/dam/kb/en/837/cpsid_83709/attachments/Acrobat_Enterprise_Ad ministration.pdf

  • Error checker not functioning correct

    i have the following piece of code:
                     if (Choice==1)
                            System.out.println("Would you like to start a new set of accounts?(yes or no)");
                            account = console.next();
                                while (account!="yes" && account !="no")
                                    System.out.print("please enter either yes or no:");
                                    account = console.next();
                     }and regardless of if i eneter yes no or something else, the while loops error message continues to appear, i thought it may be because i used || instead of && but thats not so
    Cheers in advance
    Marc

    arrrrrgh!!
    while (!account.equals("yes") && !account.equals("no"))
    I hope it is clear to you now..

  • Flex bug in global error handling

    My application's global error handler (uncaught error handler) works mostly, but I found a case where it doesn't work, but should.  Before I filed an official bug report I wanted to post the issue here.
    Here is the issue: in a module, ErrorEvents that are not listened for  and are dispatched by a Flex component are never caught in the application's uncaught error handler. 
    I have a sample project that demonstrates this.  Here is the module in my test case:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
        <![CDATA[
            private function onClickSparkDispatch():void {
                dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );   // this isn't caught in the uncaught error handler
            private function onClickNonSparkDispatch():void {
                var nonSparkDispatcher:EventDispatcher = new EventDispatcher();
                nonSparkDispatcher.dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );  // this is caught in the uncaught error handler
        ]]>
    </fx:Script>   
        <s:HGroup>
            <s:Button label="Module Spark Dispatch (broken)" click="onClickSparkDispatch()" />
            <s:Button label="Module Non-Spark Dispatch" click="onClickNonSparkDispatch()" />
        </s:HGroup>
    </s:Module>
    Using Flex 4.6
    My application statically links in the Flex SDK ("merged into code" in Flash Builder).
    My applications works around these two exsiting bugs:
         https://bugs.adobe.com/jira/browse/SDK-28018
         http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html
    Is this a bug?
    Thanks,
    Rick

    It’s been reported.  Here is more information and a workaround. http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html

  • IE / Spry Bug with custom error handler

    Ok, as I was looking through SpryData.js I noticed these
    wonderful lines:
    Spry.Utils.loadURL.callback = function(req)
    if (!req || req.xhRequest.readyState != 4)
    return;
    if (req.successCallback && (req.xhRequest.status ==
    200 || req.xhRequest.status == 0))
    req.successCallback(req);
    else if (req.errorCallback)
    req.errorCallback(req);
    In particular the "errorCallback()" method interested me as I
    wanted to introduce my own error handler. As I went about testing
    this I came up with a quick try of:
    var url = "/cfcs/mycfc.cfc?method=IsValidPath&path=" +
    encodeURIComponent(sl.value + sd.value);
    var optionsObj = new Object();
    optionsObj.errorCallback = ShowError;
    Spry.Utils.loadURL("GET", url, false, ValidateForm,
    optionsObj);
    And this works great in FF, but not IE. When I cause an error
    to occur from ColdFusion I pass a status code of "500". In FF the
    error code causes my "ShowError" function to fire, but not in IE. I
    tracked it to this bit of code in SpryData.js:
    Spry.Utils.loadURL = function(method, url, async, callback,
    opts)
    var req = new Spry.Utils.loadURL.Request();
    req.method = method;
    req.url = url;
    req.async = async;
    req.successCallback = callback;
    Spry.Utils.setOptions(req, opts);
    try
    req.xhRequest = Spry.Utils.createXMLHttpRequest();
    if (!req.xhRequest)
    return null;
    if (req.async)
    req.xhRequest.onreadystatechange = function() {
    Spry.Utils.loadURL.callback(req); };
    req.xhRequest.open(req.method, req.url, req.async,
    req.username, req.password);
    if (req.headers)
    for (var name in req.headers)
    req.xhRequest.setRequestHeader(name, req.headers[name]);
    req.xhRequest.send(req.postData);
    if (!req.async)
    Spry.Utils.loadURL.callback(req);
    catch(e) { req = null; Spry.Debug.reportError("Exception
    caught while loading " + url + ": " + e.message); }
    return req;
    Apparently running (req.xhRequest.send(req.postData);) in IE
    will throw an error if the requested page throws an error status
    code. This causes the try/catch in the Spry function to catch the
    IE error and never allows my own error handler to run. Hopefully a
    fix for this will be in the works because I really like the idea of
    being able to use my own error handler.
    --------Edited after initial post.--------
    Ok, I figured out another item of interest. My requests
    earlier were set to "async = false". If I set "async = true" then
    it does work. I realized that because I was using sychronous mode
    and IE was throwing the error, it was preventing the call to the
    "Spry.Utils.loadURL.callback" method from occuring, while asynch
    mode uses the onreadystatechange to call the function and thus
    causes my own error handler to function. I am still interested to
    know if there is a bug here somewhere and if it is just IE or Spry
    or both. Looking forward to reading any posts.

    Hi WraithBudde,
    Thanks for all the details. In my opinion this is indeed a
    bug in Spry for the synchronous case. I'll file a bug and fix it.
    > You know you love me.
    Heh, yeah, I love anybody who takes the time to report bugs
    ... especially when they've narrowed it down to the exact set of
    lines in the source.
    Once again ... THANKS!
    --== Kin ==--

  • NewObject("XML") getting "Handler not defined #newObject" on runtime

    I'm using Director 11.5.  This code works fine in the debugging/development mode, but as soon as I put it into a projector, I get an error.  The code reads:
          gXML = newObject("XML")
          gXML.load("update_200xml")
    Using the _player.debugPlaybackEnabled = TRUE, I can see that the first line is where the script gives the error.  I have the XMLParser.x32 included in my projector.  The projector is running on Windows 7. 
    So everything runs fine and all code executes when running in development mode.  As soon as I create a projector and run it, I receive the error:
    "Handler not defined
      #newObject
    Script Error: Continue?"
    Any advice on how to get this corrected?
    Thanks in advance!

    newObject is actually a Flash method, so you will also need to include the Flash Asset Xtra in / alongside your projector.
    (Because you are creating a scripted global object rather than using a Flash sprite, the xtra is not added automatically to your movie xtras.)

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • Handler not defined error message

    Hello - I'm having difficulty with a custom handler I've
    created. Everything works well in authoring mode, but as soon as I
    try to create a projector and run it, I get a "Handler not defined"
    error message. The handler is used to query an sqlite database.
    Here's the code which sits in a linked cast movie script
    on startmovie
    set gDBInstance = new(xtra"sqlite")
    on mDBQuery gSqlstring
    gDBInstance.sqlite_open(the moviepath&"halloffame.db")
    gQuery_fetch_data = gDBInstance.sqlite_fetch(gSqlstring)
    gDBInstance.sqlite_close()
    end
    end startmovie
    The handler is called from a frame script as below:
    on enterframe
    gSqlstring = "SELECT file_location FROM mediaitem NATURAL
    JOIN category WHERE category = 'Equipment' ORDER BY mediaitem.name
    ASC"
    mDBQuery(gSqlstring)
    end enterframe
    I'm using Director 11 on Windows XP. I do have all of the
    sqlite xtras in an xtras folder next to the executable. Any
    thoughts on what I'm doing wrong??
    THX!
    Mike M

    I ran a couple test that were interesting, but first I need
    to address some bad coding practices.
    miken75,
    I see no reason to open and close a database with each query.
    Open it at the beginning of the program and close it at the end.
    You should always check for errors with every interaction
    with a database, including opening it.
    In your function "mDBQuery " you pass in a variable called
    "gSqlstring" and assign the returned data from the query to
    "gQuery_fetch_data". Neither one of these variables should be a
    Global. The whole point of the function is to pass in a temporary
    string and the function Returns query results. Do not use Globals
    in this situation.
    This is a bit nit-picky, but your function names should be
    verbs - some sort of action. "mDBQuery " is a noun. Something like
    queryDatabase, doQuery, fetchData, etc. would be better.
    A basic re-write of your startup code would be:
    global gDB
    on prepareMovie
    gDB = new(xtra"sqlite")
    Okay = gDB.sqlite_open(the moviepath&"halloffame.db")
    if Not Okay then
    alert("There was an error opening the Database")
    end if
    end prepareMovie
    on queryDB SqlString
    return gDB.sqlite_fetch(SqlString)
    end queryDB
    on stopMovie
    gDB.sqlite_close()
    end stopMovie
    Finally, "EnterFrame" is a really poor choice for an event
    that queries a database. "EnterFrame" is used when you need to do
    something many times a second, such as an animation. For a singular
    event like querying a database I suggest "prepareMovie",
    "startMovie", "beginSprite", "mouseDown", and "mouseUp".
    I'm just trying to improve your coding practices. Better
    code, means less bugs and going home early.
    To your problem:
    I tried a couple things. I placed some startup code and a
    function in an internal cast movie script and an "enterframe"
    behavior that calls the function in an external cast. I saved and
    published, and the executable comes up and gives the handler not
    defined error. This error is a Director thing. It has nothing to do
    with your code.
    If, however, you shut Director down and run the executable,
    then there is no error. This fact implies that when you try to run
    Director and the executable at the same time, then Director all
    ready has ownership of the external cast file and the executable
    therefore can not open it. Although, generally under that kind of
    circumstance you get an error message indicating that the file is
    in use by a different program. So, I don't know exactly what is
    happening here.
    I then moved the "startup" code into the external cast with
    the "enterframe" script and published. No error. Director and the
    executable run side by side just fine. Weird.
    Hope that helps.
    Randal.

  • Using code interface node with dll crashes LV 2011 but not LV 8.6... using max error handling does nothing

    Hi all,
    I'm having a peculiar problem.
    I inherited a project saved in LabVIEW 8.6. The project must use of particular dll that was built a few years ago. The original developer and source code for this .dll are long gone. The very core logic exists, in the form of embedded C code, and that's it. The .dll is called through a Code Interface Node in LV 8.6 and this setup manages to "work". Howver, running the VI that calls this .dll in LV 2011 causes an "insta crash", as in, no "program has stopped responding".  Error message pops up, then all LV windows close.
    It's very similar to that described in here:
    http://digital.ni.com/public.nsf/allkb/D84C9775ABD921CF8625772A005CA50C
    but this KB says to try putting the amount of error handling to maximum. I tried that, but it didn't help. 
    Using the "Debug" option allows me to run the just-in-time debugger with CVI 2010, which then proceeds to say this:
    Finally, I manage to get this out of it: 
    FATAL RUN-TIME ERROR:   Unknown source position, thread id 0x000012D4:   A non-debuggable thread caused a 'General Protection' fault at address 0x00000000.
    I don't think that really helps at all, but it's there.
    Here is the function prototype of the .dll:
    void  _inputPM@224(uint8_t arg1, uint16_t arg2, uint8_t arg3, float arg4, float arg5, float arg6, float arg7, float arg8, float arg9, float arg10, float arg11, float arg12, float arg13, float arg14, float arg15, float arg16, float arg17, uint16_t arg18, uint16_t arg19, uint16_t arg20, uint16_t arg21, uint16_t arg22, uint16_t arg23, uint16_t arg24, uint16_t arg25, uint16_t arg26, float arg27, float arg28, float arg29, float arg30, float arg31, float arg32, float arg33, float arg34, float arg35, float arg36, float arg37, float arg38, float arg39, float arg40, float arg41, float arg42, float arg43, float arg44, float arg45, float arg46, float arg47, uint16_t arg48, uint16_t arg49, uint16_t arg50, uint16_t arg51, uint16_t arg52, float arg53, float arg54, float arg55, float arg56);
    (never seen a function take 50 input params like that (wouldn't you use a struct? array? something? But I digress, and I don't know anything about .dlls...))  
    I do have a ".lib" and a ".cdb" file with the same name as the .dll, but those also looks like some kind of compiled file. 
    I'm sure the answer I'm going to get is that there is no way of telling what's really going on without .dll source code. I'm hoping against hope that there may be another way or hack.
    Any ideas? Thank you for you help. 
    Regards,
    Mark G 
    Solved!
    Go to Solution.

    MarkCG wrote:
    Changing the call library node to stdcall (WINAPI) did the trick! No more crash. Thank you very much!
    I haven't run LV2011 on windows XP, only on windows 7, so I don't know if that makes a dfference. But  The call type makes no difference when using LV 8.6 on the same machine, however.
    Now I've got to make the .DLL run corretly on a compact fieldpoint....  and avoid crashing IT. 
    Thank you for the help all!
    Well, the DLL did work fine in LabVIEW 8.6 because earlier versions of LabVIEW automatically proceeded to change the calling convention to stdcall, if they noticed a function name decoration of @# (# = number of bytes passed on the stack) appended to the name. This is the default naming decoration for stdcall functions used by VisualC. However this decoration can be overwritten with linker switches, other compilers don't use them always in the same way, and most likely there are in the mean time compilers out there that can produce such decorations also for non stdcall calling convention. So this automagic trickery was removed from newer LabVIEW versions.
    I do think it could be considered a bug in the code that upgrades LabVIEW VIs, that it uses the calling convention that is configuerd in the dialog, instead of the calling convention earlier LabVIEW versions used automagically, but it is an esoteric corner case.
    What Compact Fieldpoint controller do you have? If it's anything newer than 20xx or 21xx forget it. The 22xx controllers use a PPC CPU and VxWorks operating system and can never get a Windows DLL to operate properly. If it is a 20xx controller it's still highly likely that DLL can not even get loaded into LabVIEW as it likely relies on other runtime libraries and possibly Win32 APIs not present in the Pharlap ETS runtime kernel used on those controllers.
    There is a tool to check a DLL for incompatible imports that are not present on specific ETS RT systems. And this list summarizes the RT system used on the various NI controllers.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Windows Service Manager 32-Bit Has Stopped Responding/iPod not showing up in iTunes

    Hello, I've scoured this forum for answers but I cannot find any result that works. I have an iPod classic that I've connected to my Gateway running Windows Vista for over four years without issue. When I was using iTunes 9 the other day, I plugged m

  • Issue with Linksys Router and Modem with Vonage Device

    Hello, I have a Linksys Router and Cable Modem.  Plus I have Vonage for my home phone.  I have been having several problems and now, my Vonage phone will not work at all.  I have cable internet and my ISP is Cox Commuication.  I do not know how to co

  • Hidden diagnostics mode in Lumia 800 and 710

    Activate by entering ##634#. Remove from Menu by long press and selecting "Uninstall". The rest is pretty self-explanatory from the above link. Moderator's note: Link removed as it's a non-English website. Please only link to relevant websites in Eng

  • Command line to clear cache?

    JRE 1.4.2_04 I need to clear the cache on about 2000 machines and would prefer not to visit each one physically. Is there a command line parameter I can feed to jpicpl32.exe to trigger the cache clear? I've seen several threads asking about this but

  • 'Keep tool selected' in Acrobat XI Pro 11.0.10

    Why can't I find 'Keep tool selected' for any of my markup tools in Acrobat XI Pro 11.0.10? I want to only once select the 'Draw arrow' tool for example and then draw as many arrows as possible. I DO NOT want to have to go back and select the arrow t