Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Note about "choice" DBE and it's array
Topic Summary: don't let a null string get into your array! No DOORS error.
Created On: 1-Jun-2007 16:20
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 1-Jun-2007 16:20
User is offline View Users Profile Print this message


jason haury

Posts: 39
Joined: 20-Feb-2007

Just a quick "lesson learned" for you coders out there: One of the arguments for the DBE choice() is an array of strings. However, if you don't populate all of the elements of that array before passing it to the choice DBE then get ready for the Diagnostics Log window to pop up as soon as you try to show the DB containing the choice DBE! DOORS does not generate a DXL error that you can trace to a line of code. It just says there's been an access violation and then begins misbehaving! See the attached code for an example. Jason
Report this to a Moderator Report this to a Moderator
 4-Jun-2007 09:11
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The DXL interpreter is very unforgiving if you pass a null or an uninitialised parameter.
You should always ensure that variables are initialised when declared and that you check for null before passing parameters.

One exception to this is that I never initialise an Item variable to null as this sometimes causes DXL errors, don't know why, never got to the bottom of it.

// this is good
Module m = null

// this is bad - sometimes causes an error
Item i = null

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.