Page 1 of 1

Error on printing

Posted: Fri Feb 17, 2023 4:40 am
by Wolfgang Ciriack
Hello Roger,

sometimes i get this error:

Code: Select all

General Error Information:
--------------------------
Xbase Error.: 2: Parameter hat falschen Typ
Sub System..: BASE[1025]
Operation...: ":init"
Can Default.: No
Can Retry...: No
Can Substit.: Yes
Severity....: Error
Cargo.......: [None]
Tries.......: 0
Thread No...: 3
-------------------------------------------------------------------------------
Arguments of Procedure, Function or Method:
-------------------------------------------
Arguments...: 2
 Type: O, Class: XbpFont
 Type: O, Class: XbpPresSpace
-------------------------------------------------------------------------------
CallStack Information for Thread: 3
-----------------------------------
Procedure...: DC_FONTCONFIGURE(156)
 Called from: DC_PRINTER:SETFONT(2579)
 Called from: DC_PRINTER:INIT(892)
 Called from: DC_PRINTERON(3753)
 Called from: ALLGDRUCK(176)
ALLGDruck 176:

Code: Select all

 
                DCPRINT ON NAME MS_PDF_PRINTER ;
                  TOFILE OUTFILE (M->oFVW:FvwLocalTmpPath + p4 + ".pdf") ;
                  TO oPrinter ;
                  SIZE oDPar:MaxLen, 80 ;
                  FORMSIZE XBPPRN_FORM_A4 ;
                  TITLE p4
MS_PDF_PRINTER is defined as "Microsoft Print to PDF"

Have you an idea, what can cause this error (only sometimes) ?

Re: Error on printing

Posted: Fri Feb 17, 2023 8:25 am
by rdonnay
This has always been a conundrum for me.

It makes no sense that there is something wrong with the code, because it is a rare occurrence.

I'm going to try to do what Microsoft does and break past the error to allow the user to try again at a lower level.

OOPS. Something went wrong. Please try again.

This requires that you, the programmer, be familiar with BEGIN SEQUENCE and END SEQUENCE structures so a Break() will work properly.

Re: Error on printing

Posted: Fri Feb 17, 2023 10:41 pm
by Wolfgang Ciriack
Thanks, Roger.

Re: Error on printing

Posted: Sat Feb 18, 2023 10:13 am
by rdonnay
Here is an updated _DCFONT.PRG (renamed as _DCFONT.TXT) with an error trap.

http://bb.donnay-software.com/subscribe/_dcfont.txt

Copy it to your \exp20\source\dclipx folder, rename it to _DCFONT.PRG and run build20.bat to rebuild dclipx.dll
If this error occurs again your user should see a message box (OOPS. Something went wrong. please try again), and a BREAK will be sent to the most recent END SEQUENCE in your program.