<commit_before>package polyglot.types;

import polyglot.util.Position;

/**
 * Signals an error in the class resolver system. This exception is thrown
 * when a <code>ClassResolver</code> is unable to resolve a given class name.
 */
public class NoClassException extends SemanticException {
    private String className;
    
    public NoClassException(String className) {
        super("Class \"" + className + "\" not found."); 
        this.className = className;
    }
    
    public NoClassException(String className, ClassType scope) {
        super("Class \"" + className + "\" not found in scope of " + scope.toString()); 
        this.className = className;
    }
  
    public NoClassException(String className, Position position) {
        super("Class \"" + className + "\" not found.", position);
        this.className = className;
    }
    
    public String getClassName() {
        return className;
    }
}<commit_msg>Pass a Named not a ClassType to NoClassException to be used in the error message as the scope in which the lookup is performed.<commit_after>package polyglot.types;

import polyglot.util.Position;

/**
 * Signals an error in the class resolver system. This exception is thrown
 * when a <code>ClassResolver</code> is unable to resolve a given class name.
 */
public class NoClassException extends SemanticException {
    private String className;
    
    public NoClassException(String className) {
        super("Class \"" + className + "\" not found."); 
        this.className = className;
    }
    
    public NoClassException(String className, Named scope) {
        super("Class \"" + className + "\" not found in scope of " + scope.toString()); 
        this.className = className;
    }
  
    public NoClassException(String className, Position position) {
        super("Class \"" + className + "\" not found.", position);
        this.className = className;
    }
    
    public String getClassName() {
        return className;
    }
}
{'fraction_non_alphanumeric': 0.10010060362173039, 'fraction_numerical': 0.0, 'mean_word_length': 2.892367906066536, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5312286', 'n_tokens_mistral': 512, 'n_tokens_neox': 506, 'n_words': 175}