Unverified Commit d5802607 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Throw object for XMLHttpRequest (#1166)

parent 7168f2f8
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -264,12 +264,12 @@ convertDisk() {
  local FS="$7"

  [ -f "$DST_FILE" ] && error "Conversion failed, destination file $DST_FILE already exists?" && exit 79
  [ ! -f "$SOURCE_FILE" ] && error "Conversion failed, source file $SOURCE_FILE does not exists?" && exit 79
  [ ! -f "$SOURCE_FILE" ] && error "Conversion failed, source file $SOURCE_FILE does not exist?" && exit 79

  local TMP_FILE="$DISK_BASE.tmp"
  rm -f "$TMP_FILE"

  local DIR
  local DIR FA
  DIR=$(dirname "$TMP_FILE")

  if [[ "$ALLOCATE" != [Nn]* ]]; then
@@ -677,7 +677,10 @@ else
  addDisk "$DISK4_FILE" "$DISK_TYPE" "disk4" "$DISK4_SIZE" "6" "0xf" "$DISK_FMT" "$DISK_IO" "$DISK_CACHE" || exit $?
fi

DISK_OPTS+=" -object iothread,id=io2"
case "${DISK_TYPE,,}" in
  "blk" | "scsi" | "virtio-blk" | "virtio-scsi" )
    DISK_OPTS+=" -object iothread,id=io2" ;;
esac

html "Initialized disks successfully..."
return 0
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ function getInfo() {
        if (window.XMLHttpRequest) {
            request = new XMLHttpRequest();
        } else {
            throw "XMLHttpRequest not available!";
            throw new Error("XMLHttpRequest not available!");
        }

        request.onreadystatechange = processInfo;