/src/mpv5/db/common/NodataFoundException.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/ · Java · 51 lines · 14 code · 5 blank · 32 comment · 0 complexity · 3f2a9786dbe000392a0eaa069dcf1525 MD5 · raw file

  1. /*
  2. * This file is part of YaBS.
  3. *
  4. * YaBS is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * YaBS is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with YaBS. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. package mpv5.db.common;
  18. import mpv5.globals.Messages;
  19. /**
  20. * Thrown if no matching data was found, the resultset is empty
  21. *
  22. */
  23. public class NodataFoundException extends Exception {
  24. private static final long serialVersionUID = 1L;
  25. /**
  26. *
  27. */
  28. public NodataFoundException() {
  29. super(Messages.NO_DATA_FOUND.toString());
  30. }
  31. /**
  32. *
  33. * @param context
  34. */
  35. public NodataFoundException(Context context) {
  36. super(Messages.NO_DATA_FOUND.toString() + " in Context: " + context);
  37. }
  38. /**
  39. *
  40. * @param context
  41. * @param id
  42. */
  43. public NodataFoundException(Context context, long id) {
  44. super(Messages.NO_DATA_FOUND.toString() + " in Context: " + context + " with id: " + id);
  45. }
  46. }