Author Topic: LispFunction and signaling an error  (Read 13489 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
Re: LispFunction and signaling an error
« Reply #30 on: October 29, 2007, 05:23:49 PM »
Glenn;

Are you doing a library functions to be use from AutoLisp?

Glenn R

  • Guest
Re: LispFunction and signaling an error
« Reply #31 on: October 29, 2007, 06:44:18 PM »
Luis,

Of course.

Cheers,
Glenn.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8710
  • AKA Daniel
Re: LispFunction and signaling an error
« Reply #32 on: October 29, 2007, 10:48:43 PM »

Cool,
I think I’m going try the ‘(nil . exception.message) for a while and
see how it works. Here is a sample output

Quote
Command: (ADO:Tools "C:\\NewMDB.mdb" "CREATE DATABASE")
(nil . "Database already exists.")

Command: (ADO:Tools "C:\\NewMDB.mdb" "CREATE TABLE Table1 (Name VARCHAR,
Address VARCHAR, Num INTEGE)")
(nil . "Syntax error in field definition.")

Command: (ADO:Tools "C:\\NewMDB.mdb" "CREATE TABLE Table1 (Name VARCHAR,
Address VARCHAR, Num INTEGER)")
(nil . "Table 'Table1' already exists.")



Code: [Select]
catch (System.Exception ex)
      {
        result.Add(new TypedValue((int)LispDataType.Nil));
        result.Add(new TypedValue((int)LispDataType.DottedPair));
        result.Add(new TypedValue((int)LispDataType.Text,ex.Message));
      }
      return result;

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: LispFunction and signaling an error
« Reply #33 on: October 29, 2007, 10:56:56 PM »

Cool,
I think I’m going try the ‘(nil . exception.message) for a while and
see how it works. <snip>

Daniel, with the apparent inability to use the 'out' keyword methodology, that seems to be an acceptable way to handle it.
Thanks for the conversation guys ... I'm looking forward to making time to play again.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Chuck Gabriel

  • Guest
Re: LispFunction and signaling an error
« Reply #34 on: May 15, 2008, 09:13:51 AM »
Sorry to resurrect something so long dead, but have there been any new discoveries in this field?

Glenn R

  • Guest
Re: LispFunction and signaling an error
« Reply #35 on: May 15, 2008, 09:30:26 AM »
Not by me Chuck...I gave up in disgust. Someone else might though.
Do you have something to share?

Chuck Gabriel

  • Guest
Re: LispFunction and signaling an error
« Reply #36 on: May 15, 2008, 10:13:33 AM »
Do you have something to share?

Sorry, but no.  I'm just dipping my toes in for the first time and immediately ran into this problem.  If I do come up with something, I'll certainly share it, though.

Glenn R

  • Guest
Re: LispFunction and signaling an error
« Reply #37 on: May 15, 2008, 11:20:40 AM »
The water's fine...jump in! ;)