news
About Elegant Chaos
info
About me and my friends
people
Software from Elegant Chaos
software
Other stuff...
stuff

DL_HandleXError

Revision
Revised on

Description

Display the error returned by an external.

This routine is used internally by the Development library to display an error result returned from an XCMD. There isn't much point in calling it yourself.


Code

on DL_HandleXError name,type
  global XStatus,XError, XErrorHandler
  
  -- change XErrorHandler to avoid recursion
  put XErrorHandler into oldHandler
  put empty into XErrorHandler
  beep
  
  get "Error "" & XStatus & "" in " & type && name && the long time & "."
  put return & return & XError after it
  
  if name is "TextView" then
    beep
    answer it
    exit UL_HandleXError
    end if
    
    if there is not a window "Errors" then
    TextView "Errors",true,"Grey,2"
    set the scrollbar of window "Errors" to 8
    set the rect of window "Errors" to "206,134,406,234"
    end if
    
    if there is a window "Errors" then
    if the text of window "Errors" is not it then
    set the text of window "Errors" to it
    end if
    show window "Errors"
    end if
    
    put oldHandler into XErrorHandler
    
    
    
    end DL_HandleXError