comparison src/org/tmatesoft/hg/core/HgInvalidFileException.java @ 394:f52ca9530774 v0.8.0

Resolve FIXMEs: more consistent exceptions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 Feb 2012 03:10:55 +0100
parents 856517285256
children 0ae53c32ecef
comparison
equal deleted inserted replaced
393:728708de3597 394:f52ca9530774
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
42 super(message, th); 42 super(message, th);
43 } 43 }
44 44
45 public HgInvalidFileException(String message, Throwable th, File file) { 45 public HgInvalidFileException(String message, Throwable th, File file) {
46 super(message, th); 46 super(message, th);
47 localFile = file; 47 localFile = file; // allows null
48 } 48 }
49 49
50 public HgInvalidFileException setFile(File file) { 50 public HgInvalidFileException setFile(File file) {
51 assert file != null; 51 assert file != null; // doesn't allow null not to clear file accidentally
52 localFile = file; 52 localFile = file;
53 return this; 53 return this;
54 } 54 }
55 55
56 /** 56 /**