Examples of DriverException


Examples of org.jnode.driver.DriverException

    protected void startDevice() throws DriverException {
        try {
            SMBFSDevice device = (SMBFSDevice) getDevice();
            device.getManager().rename(device, device.getId(), true);
        } catch (DeviceAlreadyRegisteredException ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

            devices.clear();
            fdc = FloppyDriverUtils.getFloppyDeviceFactory().createFDC(getDevice());
            bus = new FloppyControllerBus(this);
            registerDevices();
        } catch (FloppyException ex) {
            throw new DriverException("Cannot register drives", ex);
        } catch (ResourceNotFreeException ex) {
            throw new DriverException("Cannot claim all resources", ex);
        } catch (NamingException ex) {
            throw new DriverException("Cannot obtain device factory", ex);
        }
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }

    }
View Full Code Here

Examples of org.jnode.driver.DriverException

            // Execute INQUIRY
            try {
                scsiDevice.inquiry();
            } catch (SCSIException ex) {
                throw new DriverException("Cannot INQUIRY device", ex);
            } catch (TimeoutException ex) {
                throw new DriverException("Cannot INQUIRY device : timeout", ex);
            } catch (InterruptedException ex) {
                throw new DriverException("Interrupted while INQUIRY device", ex);
            }
            // Register the generic SCSI device.
            try {
                final DeviceManager dm = usbDevice.getManager();
                dm.rename(scsiDevice, "sg", true);
                dm.register(scsiDevice);
                dm.rename(usbDevice, SCSIHostControllerAPI.DEVICE_PREFIX, true);
            } catch (DeviceAlreadyRegisteredException ex) {
                throw new DriverException(ex);
            }
        } catch (USBException e) {
            throw new DriverException(e);
        }

    }
View Full Code Here

Examples of org.jnode.driver.DriverException

                this.device.registerAPI(BlockDeviceAPI.class, this);
            } else {
                this.device.registerAPI(FSBlockDeviceAPI.class, this);
            }
        } catch (DeviceAlreadyRegisteredException ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

                //((USBStorageBulkTransport)USBMassStorage.getTransport()).getMaxLun(usbDev);
                break;
            case US_PR_SCM_ATAPI:
                log.info("*** Set transport protocol to SCM ATAPI");
            default:
                throw new DriverException("Transport protocol not implemented.");
        }

        USBEndPoint ep;
        for (int i = 0; i < intf.getNumEndPoints(); i++) {
            ep = this.usbInterface.getEndPoint(i);
View Full Code Here

Examples of org.jnode.driver.DriverException

    protected void stopDevice() throws DriverException {
        try {
            unlock();
        } catch (IOException ex) {
            throw new DriverException(ex);
        } finally {
            final SCSIDevice dev = (SCSIDevice) getDevice();
            dev.unregisterAPI(RemovableDeviceAPI.class);
            dev.unregisterAPI(FSBlockDeviceAPI.class);
            dev.unregisterAPI(SCSIDeviceAPI.class);
View Full Code Here

Examples of org.jnode.driver.DriverException

        final ResourceManager rm;

        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }

        this.irq = rm.claimIRQ(owner, irq_nr, this, true);

        try {
View Full Code Here

Examples of org.jnode.driver.DriverException

    protected PCIBaseAddress getIOBaseAddress(Device device, Flags flags)
        throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();
        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: no base address");
        }
        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[0];
    }
View Full Code Here

Examples of org.jnode.driver.DriverException

        } catch (DriverException ex) {
            throw ex;
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.