Search completed in 0.99 seconds.
getLastError - Archive of obsolete content
get
lasterror returns the most recent nonzero error code.
... method of install object syntax int get
lasterror (); parameters none.
...description use get
lasterror method to obtain the most recent nonzero error code since initinstall or reseterror were called.
...And 2 more matches
Additional Install Features - Archive of obsolete content
you can use the get
lasterror() function to determine whether an error occured.
...for example, you might put the following as the last section of your script: if (get
lasterror() == success) { performinstall(); } else { cancelinstall(); } error codes that could be returned by get
lasterror() are listed in the mozilla source file nsinstall.h.
mozIStorageConnection
lasterror long the last sqlite error code that occurred.
...
lasterrorstring autf8string the english error string reported by the sqlite library for the last sqlite operation.
ctypes
win
lasterror number|undefined the value of the latest windows error.
... similar to get
lasterror under windows, available only for windows.
Mozilla Application Framework in Detail - Archive of obsolete content
ow easy it is to write cross-platform installations that use the mozilla browser: // register chrome registerchrome(package | delayed_chrome, getfolder("chrome","xmlterm.jar"), "content/xmlterm/"); registerchrome(skin | delayed_chrome, getfolder("chrome","xmlterm.jar"), "skin/modern/xmlterm/"); registerchrome(locale | delayed_chrome, getfolder("chrome","xmlterm.jar"), "locale/xmlterm/"); if (get
lasterror() == success) performinstall(); else { alert("error detected: "+get
lasterror()); cancelinstall(); } other features a resource description framework (rdf) parser with support for creating rdf graphs programmatically or by parsing files, compositing multiple sources into a single rdf graph, querying and manipulating graphs, and populating xul widgets (trees, menus, etc.) with graph data...
File.macAlias - Archive of obsolete content
xpisrc = "miscellaneous program"; var vi = "1.1.1.1"; initinstall( "macintosh alias", "misc", vi, 0); f = getfolder("program"); g = getfolder("mac desktop"); addfile( "filemacalias", "2.2.2.2", xpisrc, f, xpisrc, true); err = file.macalias(f, xpisrc, g, xpisrc + " alias"); logcomment("file.macalias returns: " + err); if (0 == get
lasterror()) performinstall(); else cancelinstall(); ...
File.windowsShortcut - Archive of obsolete content
indows shortcut", "test", vi, 0); f = getfolder("windows"); g = getfolder("temporary"); addfile( "miscshortcut", "2.2.2.2", xpisrc, f, xpisrc, true); target = getfolder(f, xpisrc); shortcutpath = getfolder("program"); err = file.windowsshortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logcomment("file.windowsshortcut returns: " + err); if (0 == get
lasterror()) performinstall(); else cancelinstall(); ...
Install.addDirectory - Archive of obsolete content
var vi = "10.10.10.10"; var xpisrc = "adddir1"; initinstall("addfilenovers1", "adddir_1", vi, 1); f = getfolder("program"); setpackagefolder(f); err = adddirectory(xpisrc); logcomment("the error = " + err); if (0 == get
lasterror()) performinstall(); else cancelinstall(); ...
Install.addFile - Archive of obsolete content
var xpisrc = "file.txt"; initinstall( "adding a file", "testfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == get
lasterror()) performinstall(); else cancelinstall(); ...
addFile - Archive of obsolete content
example var xpisrc = "file.txt"; initinstall("adding a file", "addfile", "1.0.1.7", 1); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); if (0 == get
lasterror()) performinstall(); else cancelinstall(); ...
refreshPlugins - Archive of obsolete content
example // install dll into plugins // install xpt into components var xpisrc = "npmcult3dp.dll"; var xpisrc2 = "nsic3dpscriptablepeer.xpt"; initinstall( "cult3d plugin file", "@cycore.com/cult3d;version=1.0.0", "1.0.0"); setpackagefolder(getfolder("plugins")); addfile(xpisrc); addfile("",xpisrc2,getfolder("components"),""); var err = get
lasterror(); if (err == success) { err = performinstall(); if (err == success) refreshplugins(); } else cancelinstall(err); ...
Install Object - Archive of obsolete content
perform installation check that the files have been added successfully (e.g., by checking the error return codes from many of the main installation methods, and go ahead with the install if everything is in order: performorcancel(); function performorcancel() { if (0 == get
lasterror()) performinstall(); else cancelinstall(); } for complete script examples, see script examples.
XPInstall API reference - Archive of obsolete content
objects install properties methods adddirectory addfile alert cancelinstall confirm deleteregisteredfile execute gestalt getcomponentfolder getfolder get
lasterror getwinprofile getwinregistry initinstall loadresources logcomment patch performinstall refreshplugins registerchrome reseterror setpackagefolder installtrigger no properties methods compareversion enabled getversion install installchrome ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
var xpisrc = "cd_ripper.exe"; var xpidoc = "readme_cdrip"; initinstall("my cd ripper", "cdrip", "1.0.1.7"); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); addfile(xpidoc); if (0 == get
lasterror()) performinstall(); else cancelinstall(); the example above shows this minimal installation.
OS.File.Error
win
lasterror (defined under windows only) the system error number (get
lasterror) for the error.
js-ctypes reference
other features error-handling js-ctypes supports both errno (on all platforms) and get
lasterror (on windows platforms).