From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "frank_lupo" <frank_lupo(at)email(dot)it>, "pgadmin-hackers" <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: idea error Handler |
Date: | 2003-03-05 13:10:20 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B8259D05@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Thanks, committed in pgAdmin (but not pgSchema, plugins or exporters).
Regards, Dave
> -----Original Message-----
> From: frank_lupo [mailto:frank_lupo(at)email(dot)it]
> Sent: 04 March 2003 18:49
> To: pgadmin-hackers
> Subject: [pgadmin-hackers] idea error Handler
>
>
> Current error Handler in first line of routine is :
>
> On Error GoTo Err_Handler
>
>
>
> In ide this method is not good because is not possible to
> debug routine when
>
> when it comes generated an error.
>
>
>
> Change all routine using
>
> If InIDE Then: On Error GoTo 0: Else: On Error GoTo Err_Handler:
>
>
>
> The "InIDE" is the global variable which indicate if program
> running in VB Design Environment (ide).
>
>
>
> This is a method to retrive if execution is in ide.
>
>
>
> ------------------------------
>
> '''module global
>
> Global InIDE As Boolean
>
>
>
> '''module api
>
> Public Declare Function GetModuleFileName Lib "kernel32"
> Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal
> lpFileName As String, ByVal nSize As Long) As Long
>
>
>
> '''module misc
>
>
>
> sub main
>
> ....
>
> InIDE = InVBDesignEnvironment
>
> ....
>
> end sub
>
>
>
>
>
> 'verify if execution of pgAdin2 is in ide
>
> Public Function InVBDesignEnvironment() As Boolean
>
> Dim szFileName As String
>
> Dim lCount As Long
>
>
>
> szFileName = String(255, 0)
>
> lCount = GetModuleFileName(App.hInstance, szFileName, 255)
>
> szFileName = Left(szFileName, lCount)
>
>
>
> InVBDesignEnvironment = False
>
> If UCase(Right(szFileName, 7)) = "VB6.EXE" Then
> InVBDesignEnvironment = True
>
> End Function
>
>
>
>
>
>
>
> Bye !!
>
> Frank Lupo (Wolf) !!
>
>
>
> /\_ _/\
>
> \ o o /
>
> --ooo-----ooo---
>
>
>
> --
> Prendi GRATIS l'email universale che... risparmia:
http://www.email.it/f
Sponsor:
Speciale voli a soli 80 Euro...affrettatevi, cliccate e partite per la
Scandinavia Clicca qui:
http://adv.email.it/cgi-bin/foclick.cgi?mid=1228&d=4-3
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | frank_lupo | 2003-03-05 21:11:25 | Re: idea error Handler |
Previous Message | Dave Page | 2003-03-05 12:22:53 | Re: PGAdmin 3 Patch |