Topic
  • 4 replies
  • Latest Post - ‏2013-07-11T14:08:43Z by Mike.Scharnow
EHcnck
EHcnck
96 Posts

Pinned topic redirect error message

‏2013-07-10T13:22:12Z |

Hello,

is there a way of suppressing/redirecting the error message, using no/lastError didn't work? Thank you.

http://www-01.ibm.com/support/docview.wss?uid=swg21396976

*got the attached error message when attempting to save the module.

-Jim

Attachments

  • adevicq
    adevicq
    154 Posts

    Re: redirect error message

    ‏2013-07-11T07:10:59Z  

    Hi,

    What kind of operation do you want to trap?

    Regards

  • Adamarla
    Adamarla
    79 Posts

    Re: redirect error message

    ‏2013-07-11T08:18:03Z  

    Go to the key:

    • HKEY_CURRENT_USER\Software\Telelogic\DOORS\9.3\Config

    Add/Modify the Value Name:

    • LOGFILE

    Set it to String Value Type:

    • REG_SZ

    Set the Value Data to a FilePath:

    • eg. C:\DXL.log

    -Adam

  • EHcnck
    EHcnck
    96 Posts

    Re: redirect error message

    ‏2013-07-11T13:11:40Z  
    • Adamarla
    • ‏2013-07-11T08:18:03Z

    Go to the key:

    • HKEY_CURRENT_USER\Software\Telelogic\DOORS\9.3\Config

    Add/Modify the Value Name:

    • LOGFILE

    Set it to String Value Type:

    • REG_SZ

    Set the Value Data to a FilePath:

    • eg. C:\DXL.log

    -Adam

    This didn't work.

     

    sample error I would like to redirect

    Module m = read("/New Family Car Project/Requirements/System Requirements", true)
    m = module(item("/New Family Car Project/Requirements/System Requirements-INVALIDMODULE"))
    close(m)

    -Jim

  • Mike.Scharnow
    Mike.Scharnow
    210 Posts

    Re: redirect error message

    ‏2013-07-11T14:08:43Z  

    as far as I know there is no single way to trap all kinds of errors that occur, as you already saw when noError didn't work.

    I admit that I have never seen this timeout error. To me this sounds like a severe problem which occurs in rare situations which should be solved somehow - I'm not sure if it can be trapped.

     

    As for your last example: Still not sure, which situation exactly you want to avoid / trap. 

    m = module (item(xx)) can be trapped with noError(), but if you write your code more defensively, this will not occur. You could write your code like 

    Item i = item ("xxx")
    if null i then {do whatever you want to do; exit your code}
    Module m = module i

    You should not close modules unless you are really sure that m is a valid module - otherwise you might get protection faults - and you don't want this :-)

     

    hth

    Mike